Timeout settings for iOS client

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Ozwel
OpenVpn Newbie
Posts: 15
Joined: Sat Oct 15, 2016 9:18 am

Timeout settings for iOS client

Post by Ozwel » Wed Jan 17, 2018 12:57 pm

Hi,

I couldn't find an answer here, so...

I am looking for a setting to tweak the timer when the VPN connection drops off after the iPhone is locked/screen is turned off.

What I want to avoid is the delay between when you unlock the iPhone and when the VPN connects back. It takes about 3-4 seconds but during this time the iPhone is using the 4G/WiFi connection without VPN so becomes vulnerable.

Can you also confirm when the iPhone is locked, all incoming traffic is coming through the public connection, not the VPN as well?

In short, how can you force the VPN connection staying up even when the iPhone is sleeping in your pocket?

Cheers

edit: I'm using 1.2.6 released today.

User avatar
ordex
OpenVPN Inc.
Posts: 444
Joined: Wed Dec 28, 2016 2:32 am
Location: IRC #openvpn-devel @ libera.chat

Re: Timeout settings for iOS client

Post by ordex » Wed Jan 17, 2018 1:05 pm

Ozwel wrote:
Wed Jan 17, 2018 12:57 pm
Hi,

I couldn't find an answer here, so...

I am looking for a setting to tweak the timer when the VPN connection drops off after the iPhone is locked/screen is turned off.
The connection is expected to stay alive until iOS enters sleep mode. At that point the VPN connection is stopped.
Ozwel wrote:
Wed Jan 17, 2018 12:57 pm
What I want to avoid is the delay between when you unlock the iPhone and when the VPN connects back. It takes about 3-4 seconds but during this time the iPhone is using the 4G/WiFi connection without VPN so becomes vulnerable.

Can you also confirm when the iPhone is locked, all incoming traffic is coming through the public connection, not the VPN as well?

In short, how can you force the VPN connection staying up even when the iPhone is sleeping in your pocket?
When iOS enters sleep mode there is no way to keep the VPN connection alive, but you can keep "the tunnel" alive. This way all the packets accidentally sent while the connection is still down (i.e. right after wakeup) will be dropped and not leaked.

This behaviour can be tuned using the "Seamless Tunnel" option in the OpenVPN Connect Settings.
When on, the tunnel interface stays up and fully configured even though the connection to the VPN server is stopped.
When off, the tunnel is deconfigured altogether with the VPN connection, thus possibly leading to small leaks (also during spurious reconnections due to network instability).

edit: have a look at this FAQ "What is the meaning of the various OpenVPN settings in the iOS Settings App?" at the URL you posted
edit2: and also "If my OpenVPN profile uses redirect-gateway, does that guarantee that all of my network traffic will be routed through the VPN tunnel?"

Ozwel
OpenVpn Newbie
Posts: 15
Joined: Sat Oct 15, 2016 9:18 am

Re: Timeout settings for iOS client

Post by Ozwel » Wed Jan 17, 2018 1:11 pm

Thanks! Can be closed.

Post Reply