VirtualBox – How to Use Host VPN in Guest VM?

virtual machinevirtualboxvpn

I have a host Windows 7 OS running a guest Lubuntu OS in VirtualBox and I'm trying to configure it so that the Guest OS will use the Host VPN.

So a couple quirks, when the VPN is turned off the guest internet connection will work however when the VPN is turned on it seems to be blocking traffic from the guest. Nothing I've found so far has provided a complete solution.

Extra Info:

  • VBox is currently configured to use NAT.
  • VPN is using Cisco AnyConnect 4.2

Best Answer

Open an admin console on your windows7 host and execute the following:

$ VBoxManage list vms

Note that uuid or name in parenthesis of your VM and then:

$ VBoxManage modifyvm <uuid or name here> --natdnshostresolver1 on

Note that your VM needs to be turned off before you execute the above command.

Related Question