Page 1 of 1
Turn Off VPN when VPN Server is not reachable in iOS 8
Posted: Wed Dec 10, 2014 7:15 am
by sumaiay
Hi,
I am facing an issue where VPN tries connecting when VPN server is down infinitely, for which i did some VPN payload changes
connect-timeout 30
connect-retry 600
connect-retry-max 1
resolv-retry 0
Even after doing these changes when VPN Server is down my normal internet goes for a toss and does not turn on for 120 seconds.
Where is it takes timeout of 60 seconds and tries twice after 5 seconds of gap.
Can someone give me a solution of disconnecting VPN after 30 seconds timeout in iOS 8?? As iOS 7 i have no issue of disconnecting with these payload settings.
Tried On Demand rules - Disconnect.
http://stackoverflow.com/questions/2507 ... os-6-ios-7
Any help is appreciated.
Re: Turn Off VPN when VPN Server is not reachable in iOS 8
Posted: Wed Dec 10, 2014 12:19 pm
by Traffic
Depending on the protocol you use:
Client Config
- TCP:
- connect-retry 5
connect-retry-max 6 ## 6 retries times 5 seconds = 30 seconds
UDP:
- ping 5
ping-exit 30 ## exit after 30 seconds of no pings .. do not use --ping-remote in your config.
You may have to remove
--keepalive from the server config as it will override client settings once connected.
Re: Turn Off VPN when VPN Server is not reachable in iOS 8
Posted: Thu Dec 11, 2014 12:22 pm
by sumaiay
Hey, Thanks for your response!
I really appreciate.
But my problem is not yet resolved still. After doing the following changes what you mentioned still by default VPN takes 60 seconds timeout with 2 tries totally 120 seconds and the main issue here till then i will not be able to access normal internet.
Re: Turn Off VPN when VPN Server is not reachable in iOS 8
Posted: Thu Dec 11, 2014 12:24 pm
by sumaiay
Hey, Thanks for your response!
I really appreciate.
But my problem is not yet resolved still. After doing the following changes what you mentioned still by default VPN takes 60 seconds timeout with 2 tries totally 120 seconds and the main issue here till then i will not be able to access normal internet.
Have also set keep alive on server configuration as 30 seconds before it was 3600 seconds.
And i am using TCP protocol.
Thanks In Anticipation!
Re: Turn Off VPN when VPN Server is not reachable in iOS 8
Posted: Tue Dec 30, 2014 12:53 pm
by Traffic
sumaiay wrote:i am using TCP protocol
Have you read the manual:
--connect-retry n
- For --proto tcp-client, take n as the number of seconds to wait between connection retries (default=5).
--connect-timeout n
- For --proto tcp-client, set connection timeout to n seconds (default=10).
--connect-retry-max n
- For --proto tcp-client, take n as the number of retries of connection attempt (default=infinite).
https://community.openvpn.net/openvpn/w ... Page#index
Traffic wrote:Client Config
- TCP:
- connect-retry 5
connect-retry-max 6 ## 6 retries times 5 seconds = 30 seconds
Perhaps you need a
--connection-timeout parameter as well .. and adjust my example to your requirements.
Re: Turn Off VPN when VPN Server is not reachable in iOS 8
Posted: Fri Jan 02, 2015 4:50 am
by sumaiay
Yes i have gone through the manual, therefore i did changes in my VPN Payload.
connect-timeout - 10
connect-retry-max - 0
connect-retry - 600
I assume iOS takes charge overriding the VPN Payload in the Config.