I have a configuration profile for VPN on demand if the VPN server is down then internet is not getting connected.
I have enabled on demand VPN connection using below lines in my mobileconfig profile
<key>OnDemandEnabled</key> <integer>1</integer> <key>OnDemandMatchDomainsAlways</key> <array> <string>*</string> </array> <key>OnDemandMatchDomainsNever</key> <array/> <key>OnDemandMatchDomainsOnRetry</key> <array/> <key>OnDemandRules</key> <array> <dict> <key>Action</key> <string>Connect</string> </dict> </array>
On-Demand VPN is establishing as expected in iOS 6 & 7. Whereas when the VPN server is down, on-demand still tries to establish connection and it fails, hence the user is not able to reach the internet. I want to disable VPN connection when the VPN server is down, hence user can use the internet. I tried the following On-Demand rule to connect VPN when I able to reach a service of my VPN server else disconnect VPN.
<key>OnDemandRules</key> <array> <dict> <key>URLStringProbe</key> <string>http://myserverip/openvpn/server</string> <key>Action</key> <string>Connect</string> </dict> </array>
<key>OnDemandRules</key> <array> <dict> <key>RequiredURLStringProbe</key> <string>https://host.domain.com/nonexistent_url</string> <key>DomainAction</key> <string>ConnectIfNeeded</string> </dict> </array>
I tried both the approaches they neither connect the VPN nor Disconnect the VPN
I referred the following links
Steps to Reproduce:
Configure you device VPN connection using OpenVPN client app with OpenVPN server(Certificate based authentication)
Make sure you have a working VPN connection using OpenVPN server
Configure a VPN on demand for any internet connection using wild card filter(*)
Now shut your OpenVPN server down thats it.the internet connection of device will go down
if OpenVPN server is not reachable then the device should not try to reach it again and again Instead after sometime it should stop trying and connect with public internet
Device's internet connection is cut off
Version: I tried in both iOS 6 and 7
I want to disable VPN or On-Demand feature in iOS 6 & 7 when VPN server is down.
Here is a link that has configuration profile(dummy) of mine.
Here is a link that has ipcu console log when connection fails