Closed BenLender closed 10 months ago
@BenLender Hello! The default VPN On Demand configuration in this project disconnects the VPN while on mobile networks, so this is normal. In the most common use case, people expect the VPN to connect on Wi-Fi networks but not mobile networks.
To change this behavior for your use case:
/opt/src/ikev2.sh
on your VPN server. Find this section:
<dict>
<key>InterfaceTypeMatch</key>
<string>Cellular</string>
<key>Action</key>
<string>Disconnect</string>
</dict>
and replace "Disconnect" with "Connect", i.e.
<dict>
<key>InterfaceTypeMatch</key>
<string>Cellular</string>
<key>Action</key>
<string>Connect</string>
</dict>
sudo ikev2.sh
to export updated client configuration files for your iPhone..mobileconfig
file from step 2.@hwdsl2 Thank you very much!
Checklist
Describe the issue VPN on demand does not work on mobile networks anymore.
To Reproduce
Expected behavior When the VPN connection is lost, the mobile device reconnects no matter the network it is in. Actual behavior: the mobile device reconntects flawlessly in wifi networks. The mobile device does not connect when not in a wifi network. While in a mobile network, as soon as "vpn on demand" is deactivated manually activing the vpn connecting becomes possible.
Logs Check logs and VPN status, and add error logs to help explain the problem, if applicable.
Server (please complete the following information)
Client (please complete the following information)
Additional context not applicable