Page 1 of 1

VPN Auto-connect occasionally gets stuck at Wait

Posted: Sat Jun 19, 2021 11:56 pm
by yochaigal
For the past few months I've noticed that occasionally the Internet will stop working on my Pixel 5 (and previously on my Pixel 4). Usually, I pull out the phone and notice that nothing browses; I then go into VPN Client Pro and stop/start the connection. Then everything works. The status is always stuck on "Wait" as if the device can't reach my home OpenVPN server. Any suggestions to resolve this? Can I somehow set the VPN Client to just give up? I'm fine if I occasionally get ads on my device, but I need the Internet working.

I use pivpn (OpenVPN 2.4.0 on my raspberry pi). The logs are here.

Thanks!

Re: VPN Auto-connect occasionally gets stuck at Wait

Posted: Mon Jun 21, 2021 7:34 am
by admin
Hello,
you can try to tune the "ping 1800, ping-restart 3600" options pushed by the server.
Maybe you can try "ping 30, ping-restart 60" which means: send a ping every 30 seconds and restart the VPN if the ping is not received for 60 seconds.

Re: VPN Auto-connect occasionally gets stuck at Wait

Posted: Mon Jun 21, 2021 11:24 am
by yochaigal
Change the options on the VPN Client or set it through the server as well?

And thanks!

Re: VPN Auto-connect occasionally gets stuck at Wait

Posted: Mon Jun 21, 2021 12:20 pm
by admin
You're welcome.
By default these options are overridden by those sent by the server.
So if you change them on the server, you don't have to do anything else.
Otherwise, if you want to change them only on the client, then also add the "pull-filter" option with the value set to "ignore ping" in the "Advanced options" section of the client's VPN profile

Re: VPN Auto-connect occasionally gets stuck at Wait

Posted: Mon Jun 21, 2021 12:48 pm
by yochaigal
This means I'll need to disable keepalive, right?

Re: VPN Auto-connect occasionally gets stuck at Wait

Posted: Mon Jun 21, 2021 1:03 pm
by admin
The keepalive option is a shortcut to ping and ping-restart options.
The option "keepalive 30 60" is equivalent to "ping 30" and "ping-restart 60".
So you can simply change the values of keepalive option.