Page 1 of 1

OVPN Inactive Parameter not working because of ping

Posted: Wed Mar 01, 2023 9:13 am
by mabr
Hello guys,

I experienced a problem lately with my ovpn config file.

It currently looks like this:

client
dev tun
proto udp
remote xxxxxxxxx
remote-random-hostname
resolv-retry infinite
inactive 60
nobind
remote-cert-tls server
cipher AES-256-GCM
--cert "xxxxxxx"
--key "xxxxxx"
verb 3
<ca>
-----BEGIN CERTIFICATE-----
xxxxxxxxx
-----END CERTIFICATE-----

</ca>


reneg-sec 0



The inactive parameter is set to 60 seconds. But my connection won´t be closed after 60 seconds because a ping will be sent every ~5 seconds... So the system won´t get the inactive status because of the ping.

How can I fix this issue?

Re: OVPN Inactive Parameter not working because of ping

Posted: Wed Mar 01, 2023 5:14 pm
by openvpn_inc
Hello mabr,

I suggest trying to add a bytes value. inactive 60 1024 for example. Meaning that if within 60 seconds less than 1024 bytes are sent, the connection is terminated.

See also --inactive on this page:
https://openvpn.net/community-resources ... envpn-2-6/

Note that clients may choose to autoreconnect.

Kind regards,
Johan