OpenVPN connection still active while PC on sleep

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
moadmin
OpenVpn Newbie
Posts: 1
Joined: Tue Dec 19, 2023 9:43 am

OpenVPN connection still active while PC on sleep

Post by moadmin » Tue Dec 19, 2023 9:51 am

Hello,

We have an issue where when the user who is connected to the VPN and working remotely puts the PC to sleep then if he came to the office and opened the pc and tried to login to his/her AD account it will take a lot of time to sign in and sometimes the user have to restart the pc to reset the network adapters and netsh protocols. also the internet becomes slow.

Is there any command that we can implement on our client config that disconnects the VPN once the pc is on sleep mode ?
we deploy OpenVPN as a service only (not GUI) to all our users and its set to auto connects if the user is not on the local LAN.


OS is windows 10 pro
OpenVPN v2.5.8 Hosted on pfSense 2.7

Thank you.

Frostk1
OpenVpn Newbie
Posts: 3
Joined: Tue Dec 26, 2023 5:24 am

Re: OpenVPN connection still active while PC on sleep

Post by Frostk1 » Tue Dec 26, 2023 5:26 am

Hi,

To address the issue of slow login and network problems after waking up from sleep mode, you can try adding the following line to your OpenVPN client configuration file:

Code: Select all

[inactive [time]
Replace "[time]" with the number of seconds of inactivity before disconnecting. For example, "inactive 300" will disconnect the VPN if there's no activity for 5 minutes.

Hope this helps!

Post Reply