Page 1 of 1

Inactivity Disconnect

Posted: Tue Aug 16, 2011 8:21 am
by shaunokeefe
Hi all,

We are using pfsense with openVPN tunnels and every so often we get disconnected.....the error is

Aug 16 08:16:22 openvpn[4046]: Inactivity timeout (--ping-restart), restarting

It seems to be happening every 10 mins or so...any idea what this could be ?

Many thanks,
Shaun Okeefe

Re: Inactivity Disconnect

Posted: Tue Aug 16, 2011 8:34 am
by Mimiko
Hi.
Use "keepalive| option in you OpenVPN server's config file, adjusting time as you need.

Re: Inactivity Disconnect

Posted: Wed Aug 17, 2011 7:55 am
by shaunokeefe
Hiya,

Does that mean I would add a line in the custom options of the OpenVPN section ? (IE I current have an ovveride for MTU (tun-mtu 1300))

Do you know what the syntax and what value it should be ?

Sorry to sound dumb !

Cheers,
Shaun

Re: Inactivity Disconnect

Posted: Wed Aug 17, 2011 8:08 am
by janjust
in the server configuration, add

Code: Select all

keepalive 10 60
read the OpenVPN manual page for the meaning of the values to the keepalive option.

Re: Inactivity Disconnect

Posted: Wed Aug 17, 2011 8:21 am
by shaunokeefe
Hiya,

I've just checked the configs in the PFsense and aparantly they are all set to 10 60 already?

s

Re: Inactivity Disconnect

Posted: Wed Aug 17, 2011 8:27 am
by janjust
which host is reporting the
Aug 16 08:16:22 openvpn[4046]: Inactivity timeout (--ping-restart), restarting
message? the openvpn client or the pfsense server?

Re: Inactivity Disconnect

Posted: Wed Aug 17, 2011 10:15 am
by shaunokeefe
Hiya,

It shows up in the logs of both ends,

CLIENT
Aug 17 03:31:12 openvpn[4160]: Inactivity timeout (--ping-restart), restarting
Aug 17 03:31:12 openvpn[4160]: SIGUSR1[soft,ping-restart] received, process restarting
Aug 17 03:31:14 openvpn[4160]: Re-using pre-shared static key

Server
Aug 17 03:31:13 openvpn[4046]: Inactivity timeout (--ping-restart), restarting
Aug 17 03:31:13 openvpn[4046]: SIGUSR1[soft,ping-restart] received, process restarting
Aug 17 03:31:15 openvpn[4046]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Aug 17 03:31:15 openvpn[4046]: Re-using pre-shared static key

Re: Inactivity Disconnect

Posted: Wed Aug 17, 2011 3:31 pm
by janjust
what do your client and server configs look like? are you using preshared keys or client/server mode? if you are NOT using client/server mode, then add

Code: Select all

keepalive 10 60
to *both* sides