On demand VPN with proper inactivity
Posted: Tue Jun 02, 2015 1:46 pm
All,
I got my server setup working from openvpn ios to the openvpn server. I used the Apple configurator to create a profile and added my certificates in too.
So now when i open a app that requires a internal ip when on the road, it will start the vpn in a instant and will keep all other traffic on the other connection (4g for instance)
But the problem i have now, every time i open my iphone it will start using the vpn connection. The expected result should be that if i close the app that uses that internal ip it would eventually drop the vpn connection and only start it up if that particular internal ip is used.
In the apple configurator i set the "Enable VPN on demand" option to match the ip (and used that ip in my app too) and tried bot "Always establish" and "Establish when needed"
Also added "inactive" to the client/server but it will disconnect it but only client side (iphone still thinks it connected) also played with keepalive, ping/ping-restart things etc etc, but whatever i do, it just keeps on reconnecting.
If i disconnect it manually, it stays disconnected until i use that internal ip again. (which is what i want after disconnecting from internal too)
Anyone has some ideas about this?
Thanks,
Erik
I got my server setup working from openvpn ios to the openvpn server. I used the Apple configurator to create a profile and added my certificates in too.
So now when i open a app that requires a internal ip when on the road, it will start the vpn in a instant and will keep all other traffic on the other connection (4g for instance)
But the problem i have now, every time i open my iphone it will start using the vpn connection. The expected result should be that if i close the app that uses that internal ip it would eventually drop the vpn connection and only start it up if that particular internal ip is used.
In the apple configurator i set the "Enable VPN on demand" option to match the ip (and used that ip in my app too) and tried bot "Always establish" and "Establish when needed"
Also added "inactive" to the client/server but it will disconnect it but only client side (iphone still thinks it connected) also played with keepalive, ping/ping-restart things etc etc, but whatever i do, it just keeps on reconnecting.
If i disconnect it manually, it stays disconnected until i use that internal ip again. (which is what i want after disconnecting from internal too)
Anyone has some ideas about this?
Thanks,
Erik