OpenVPN idle disconnection
OpenVPN SSL+user authentication automatically how disconnect when connection is idle ?
JKnott last edited by
OpenVPN uses UDP. There is no connection to disconnect when idle. Or do you mean you want the tunnel to shut down and reauthenticate when there's traffic?
I found such a setting in the forums
Is it possible?
inactive n [bytes]
Causes OpenVPN to exit after n seconds of inactivity on the TUN/TAP device. The time length of inactivity is measured since the last incoming or outgoing tunnel packet. The default value is 0 seconds, which disables this feature.If the optional bytes parameter is included, exit if less than bytes of combined in/out traffic are produced on the tun/tap device in n seconds.
In any case, OpenVPN’s internal ping packets (which are just keepalives) and TLS control packets are not considered “activity”, nor are they counted as traffic, as they are used internally by OpenVPN and are not an indication of actual user activity.
what should we write in this field?
What do you want to disconnect on? If less then X bytes in Y seconds.. Or just leave off bytes and put in how many seconds of idle (no traffic) and then will be disconnected.. If you wanted to disconnect after an hour it would be 3600