Page 1 of 1

OpenVPN kills the connection after a few hours

Posted: Tue Nov 17, 2015 10:53 pm
by draken
Hi guys,

Need you assistance on the ping-exit and ping-timer-rem commands. At the moment the .conf looks like that (copy pasting the important bits)

Code: Select all

persist-tun
nobind
cipher AES-256-CBC
auth MD5
ping 5
ping-exit 60
ping-timer-rem
explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo
The problem is that I use the VPN on my Raspberry so every time I haven't used it for more than 8-9 hours I find my connection dead and I need to restart. The remote desktop is fine so it is not an ethernet issue.

I know that the problem lies on the 3 ping commands but is there any way of "forcing" the VPN tunnel to re-establish automatically if activity is detected again?

If not I guess the solution would be to increase the ping to >25secs (my VPN tunnel is pretty stable) and then the ping-exit command to >900000 (around 10 days) but I would not like to put too much strain on the VPN server.

Also can you please clarify what the ping-timer-rem command does and lastly what if I remove all 3 lines?

Thanks

Re: OpenVPN kills the connection after a few hours

Posted: Thu Nov 19, 2015 12:50 am
by Traffic
Remove:
draken wrote:Code:
ping-exit 60
:roll:

Re: OpenVPN kills the connection after a few hours

Posted: Thu Nov 19, 2015 11:47 am
by draken
Traffic wrote:Remove:
draken wrote:Code:
ping-exit 60
:roll:
:?: :?: :?:

Re: OpenVPN kills the connection after a few hours

Posted: Fri Nov 20, 2015 6:20 pm
by draken
Ok will try and keep you updated. Many thanks.

Re: OpenVPN kills the connection after a few hours

Posted: Mon Nov 30, 2015 9:40 pm
by draken
Nope that did not help. After a few hours internet was out again. Any other ideas?

Re: OpenVPN kills the connection after a few hours

Posted: Tue Dec 01, 2015 7:05 pm
by Traffic
What version of OpenVPN you use ?

Re: OpenVPN kills the connection after a few hours

Posted: Tue Dec 01, 2015 10:07 pm
by draken
2.2.1 I believe

Re: OpenVPN kills the connection after a few hours

Posted: Thu Dec 03, 2015 2:39 am
by Traffic
Check the log file for full details.

Re: OpenVPN kills the connection after a few hours

Posted: Mon Dec 28, 2015 7:21 pm
by draken
Any idea where those are as they are not in the "traditional" log folder of Raspbian?

Re: OpenVPN kills the connection after a few hours

Posted: Mon Dec 28, 2015 7:40 pm
by Traffic
See --log in The Manual v23x