OPNsense Forum

English Forums => Virtual private networks => Topic started by: bazbaz on January 17, 2024, 11:17:17 AM

Title: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: bazbaz on January 17, 2024, 11:17:17 AM
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

Title: Re: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: bartjsmit on January 17, 2024, 01:00:54 PM
RTFM? :) https://openvpn.net/community-resources/reference-manual-for-openvpn-2-5/ search for keepalive
Title: Re: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: bazbaz on January 17, 2024, 04:00:30 PM
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.
Title: Re: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: bartjsmit on January 18, 2024, 07:39:18 AM
Increase the verbosity of an OpenVPN client, or run it in the foreground. You should see the keepalive packets going back and forth.
Title: Re: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: bazbaz on January 23, 2024, 11:39:02 AM
nothing useful

I solved enabling keepalive frequency and timeout on opnsense side, that were emtpy.
Title: Re: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: LozBoz on May 03, 2024, 04:36:01 PM
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.
Title: Re: OpenVPN: Session invalidated: KEEPALIVE_TIMEOUT
Post by: bazbaz on May 06, 2024, 06:23:53 PM
sorry, I don't remember the exact settings. I suspect in openvpn server main settings