OpenVPN kills the connection after a few hours

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
draken
OpenVpn Newbie
Posts: 6
Joined: Tue Nov 17, 2015 10:36 pm

OpenVPN kills the connection after a few hours

Post by draken » Tue Nov 17, 2015 10:53 pm

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

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN kills the connection after a few hours

Post by Traffic » Thu Nov 19, 2015 12:50 am

Remove:
draken wrote:Code:
ping-exit 60
:roll:

draken
OpenVpn Newbie
Posts: 6
Joined: Tue Nov 17, 2015 10:36 pm

Re: OpenVPN kills the connection after a few hours

Post by draken » Thu Nov 19, 2015 11:47 am

Traffic wrote:Remove:
draken wrote:Code:
ping-exit 60
:roll:
:?: :?: :?:

draken
OpenVpn Newbie
Posts: 6
Joined: Tue Nov 17, 2015 10:36 pm

Re: OpenVPN kills the connection after a few hours

Post by draken » Fri Nov 20, 2015 6:20 pm

Ok will try and keep you updated. Many thanks.

draken
OpenVpn Newbie
Posts: 6
Joined: Tue Nov 17, 2015 10:36 pm

Re: OpenVPN kills the connection after a few hours

Post by draken » Mon Nov 30, 2015 9:40 pm

Nope that did not help. After a few hours internet was out again. Any other ideas?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN kills the connection after a few hours

Post by Traffic » Tue Dec 01, 2015 7:05 pm

What version of OpenVPN you use ?

draken
OpenVpn Newbie
Posts: 6
Joined: Tue Nov 17, 2015 10:36 pm

Re: OpenVPN kills the connection after a few hours

Post by draken » Tue Dec 01, 2015 10:07 pm

2.2.1 I believe

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN kills the connection after a few hours

Post by Traffic » Thu Dec 03, 2015 2:39 am

Check the log file for full details.

draken
OpenVpn Newbie
Posts: 6
Joined: Tue Nov 17, 2015 10:36 pm

Re: OpenVPN kills the connection after a few hours

Post by draken » Mon Dec 28, 2015 7:21 pm

Any idea where those are as they are not in the "traditional" log folder of Raspbian?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN kills the connection after a few hours

Post by Traffic » Mon Dec 28, 2015 7:40 pm

See --log in The Manual v23x

Post Reply