Route internet traffic to isolated vm

Posted on


I got two VMs, i want VM-2 to be an isolated host, forced to route it’s traffic through VM-1. So for example if i use a VPN on VM-1 this will affect VM-2.

Windows 7, 2 NICs Bridged networking VLAN1

Debian 7, 1 NIC VLAN1

Is this possible? Thanks in advance for any help.


If you set VM-1 to share it’s internet and VM-2 to route all it’s traffic through VM-1 this should work. You can set this setting either with ip route or route command.

I guess this should be the configuration needed on VM-2:

ifconfig eth0 
route add default gw

Note: that as far as I remember, vmplayer/vmware workstation creates a few virtual network cards, one is for the host private network, one is for the nat network. If both VM-1 and VM-2 use host private network, they should be ok.

Leave a Reply

Your email address will not be published. Required fields are marked *