Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
Ah, that was simpler than i expected. Was messing around with routing. But simply sharing the connection with the VLAN network and then setting the correct gateway in VM-2 was enough. Thanks! – John wess Jun 21 '13 at 4:14

You must log in to answer this question.

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