OpenVPN session length

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
EliteHuskarl
OpenVpn Newbie
Posts: 3
Joined: Tue Aug 03, 2021 5:21 pm

OpenVPN session length

Post by EliteHuskarl » Tue Aug 03, 2021 6:56 pm

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?

User avatar
TinCanTech
Forum Team
Posts: 9657
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN session length

Post by TinCanTech » Tue Aug 03, 2021 7:06 pm

You mean like an "inactive" option ..

EliteHuskarl
OpenVpn Newbie
Posts: 3
Joined: Tue Aug 03, 2021 5:21 pm

Re: OpenVPN session length

Post by EliteHuskarl » Tue Aug 03, 2021 7:38 pm

Either an inactive option, or just a blanket maximum session length option.

nhussain
OpenVpn Newbie
Posts: 1
Joined: Fri Aug 06, 2021 5:01 pm

Re: OpenVPN session length

Post by nhussain » Fri Aug 06, 2021 5:07 pm

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

User avatar
TinCanTech
Forum Team
Posts: 9657
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN session length

Post by TinCanTech » Fri Aug 06, 2021 6:46 pm

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.

Post Reply