Turn on/off depending of network

How to customize and extend your OpenVPN installation.
Post Reply
OpenVpn Newbie
Posts: 3
Joined: Mon Nov 05, 2018 10:19 am

Turn on/off depending of network

Post by David33 » Mon Nov 05, 2018 10:36 am


I would like to do something but I don't know if it's possible and I don't know what to search in google .Maybe you can light me.

The idea is to automatically turn off/on the OpenVPN connexion depending on the network I am connected. (This is for a company usage with Windows)

Exemple : The user is out of the enterprise and use OpenVPN to be "like" in the main local network.
He come back to the enterprise but does not think to turn off the OpenVPN connexion. Then he is in the local network but connected through the VPN...

The question is : is it possible to automatically detect the network where the PC is connected and turn OpenVPN on or off ?
Like, if the network is the local 192.168.x.x OpenVPN shutdown, and if it's something else OpenVPN turn on.

Thanks in advanced for your returns and hope there is a way to do something.


User avatar
OpenVPN Protagonist
Posts: 7792
Joined: Fri Jun 03, 2016 1:17 pm

Re: Turn on/off depending of network

Post by TinCanTech » Mon Nov 05, 2018 12:54 pm

Openvpn does not have any such functionality but there are ways to achieve this.

If you need help you can contact me here: tincanteksup <at> gmail

Post Reply