Page 1 of 1

OpenVPN session length

Posted: Tue Aug 03, 2021 6:56 pm
by EliteHuskarl
We are using OpenVPN to setup remote access for a couple of work-at-home employees. At work we use pfSense for our firewall and on the employee side the connection is made with OpenVPN GUI 2.5.3.

Is there a way to set a maximum session length, either by timing out after x minutes of inactivity, or by simply having the session close after x hours?

Re: OpenVPN session length

Posted: Tue Aug 03, 2021 7:06 pm
by TinCanTech
You mean like an "inactive" option ..

Re: OpenVPN session length

Posted: Tue Aug 03, 2021 7:38 pm
by EliteHuskarl
Either an inactive option, or just a blanket maximum session length option.

Re: OpenVPN session length

Posted: Fri Aug 06, 2021 5:07 pm
by nhussain
Hi
I need to configure the same option too. i have community version OpenVPN 2.4.8 x86_64-pc-linux-gnu.
I found this document for commercial version https://openvpn.net/vpn-server-resource ... -threshold which talks about doing so by adding this parameter vpn.server.session_expire .
anyone know how do i configure it in my community version? or another way to disconnect an idle session after Xhours? Or if there is already a solution provided in this forum please provide a link

Re: OpenVPN session length

Posted: Fri Aug 06, 2021 6:46 pm
by TinCanTech
There is no session option for the community edition.

You have to write something to control your VPN from the server management interface.

There is an inactive timeout for the community edition, which can be found in the manual.