OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT

Started by bazbaz, January 17, 2024, 11:17:17 AM

Previous topic - Next topic
Hi,
I have a road warrior OpenVPN tunnel. Authentication is based on local users + user certificates.

Connections are ok and work, but every 45 seconds the connection goes down and OpenVPN Client reconnect it. Its log says "Session invalidated: KEEPALIVE_TIMEOUT"

I cannot find how it tries to perform a keepalive and where the problem can be, any idea?
thanks



Ok, I see, but still I cannot find an idea about the problem. The VPN is working well, so traffic is ok. What kind of keepalive is the problem? The client can ping OPNSense on the IP address assigned on the tunnel (the first of the subnet). The firewall also does not log any dropped packed.
Is there some setting in my opnsense I miss? I' have many other OpnSense working well with OpenVPN DU and this is the first time I see this problem.

Increase the verbosity of an OpenVPN client, or run it in the foreground. You should see the keepalive packets going back and forth.

nothing useful

I solved enabling keepalive frequency and timeout on opnsense side, that were emtpy.

May 03, 2024, 04:36:01 PM #5 Last Edit: May 03, 2024, 04:57:57 PM by LozBoz
Would you be more specific and say how enabling keepalive frequency and timeout was done on the opnsense side?

I think I'm having a similar issue.

sorry, I don't remember the exact settings. I suspect in openvpn server main settings

I'm facing the same problem:
The VPN connection is established and working without any problems, but it disconnects about every minute. The log files contain the following messages:
⏎[Jun 14, 2025, 13:36:49] Session invalidated: KEEPALIVE_TIMEOUT
⏎[Jun 14, 2025, 13:36:49] Client terminated, restarting in 2000 ms...
⏎[Jun 14, 2025, 13:36:49] SetupClient: signaling tun destroy event
⏎[Jun 14, 2025, 13:36:51] EVENT: RECONNECTING
⏎[Jun 14, 2025, 13:36:51] EVENT: RESOLVE
I have tried changing the "Keep alive interval" and "Keep alive timeout" settings on the OPNSense firewall, setting different combinations of these parameters, but this did not lead to any changes in the operation. What else can I do to fix this?