How to handle OpenVPN client as a service, when the laptop is physically on the network already?

Posted by James on Server Fault See other posts from Server Fault or by James
Published on 2012-03-01T22:55:37Z Indexed on 2012/03/19 2:06 UTC
Read the original article Hit count: 225

Filed under:
|

The Setup

I've gotten OpenVPN working on our Windows XP laptops. Users are limited, so I went ahead and set OpenVPN client to run as a service, which is great anyway because that means they are on the VPN before logging in, so login scripts work, plus we can do remote support even if the user can not log in (such as connecting via VNC or resetting passwords). It is also configured to send all traffic over the tunnel, so when, for example, they browse the internet it is just like browsing from our corporate network.

The Qestion(s)

So, I'm wondering how does the OpenVPN client act when the computer is already physically on the same network as the OpenVPN server? Right now, the client is configured to connect the the public dns name which will resolve to the public ip address which will NOT get reflected back to the OpenVPN server, so it is affectively blocked from connecting to the OpenVPN server while on the network. Is that a good thing? Or will it constantly try to connect, using up system resources and network resources? We will likely have hundreds of laptops regularly on the physical network with this, so it could contribute to a lot of unnecessary network chatter.

Alternatively

Would it be better to have the firewall reflect the port back to the OpenVPN server and let it connect? Or have our internal dns resolve the name to the private ip and allow them to connect directly? Would traffic then go over the vpn connection (which I do not want, when already on the physical network)? Or is it possible to tell it to ignore the connection when the client and server are already on the same network?

TLDR

What's a sane way of handling OpenVPN client running as an always-on service when the client and server will often be on the same network?

© Server Fault or respective owner

Related posts about vpn

Related posts about openvpn