I am currently on a virtual machine connected to the network via NAT. I wondered what's the best practice when I want to connect to a VPN.

Should I connect to the VPN from my host OS or from my guest OS ? My guess is that if I connect from the host OS, my host OS and my VM will be protected by the VPN and if I connect from the guest OS, only the VM will be protected. Am I right ?


2 Answers 2


Depends why you are connecting to the VPN, and the configuration of it.

  1. Connecting to a VPN to access data on a different network: if you only need to access the data from within your VM, connect from your VM, else connect from the guest OS - minimal exposure.
  2. Connecting to a VPN to hide network traffic from the network owner: Connect from the guest OS - all traffic encrypted.

In the first case, other traffic may or may not go through the VPN - this is the configuration part.

In either case, a VPN only protects against a limited range of threats: specifically those which result from network traffic being monitored. You'd still be vulnerable to malware, poorly coded websites, and people looking over your shoulder!


For practical reasons I always use virtual machines for VPNs. If you have more than one network you want to connect and if they use different VPN systems it's easier to separate the different VPN client installations and you have not to fear any kind of driver incompatibility.

Sometimes VPN clients also avoid the access of other network resources than the VPN destination network - a situation where I also prefer VMs.

But if you use VMs keep them up-to-date with patches!

  • actually using a dedicated VM for a VPN client is correct, I agree Mar 2, 2016 at 11:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .