I want to connect a Linux VM running in VMWare on a Windows 7 laptop to an enterprise network using host-only configuration.

I was able to setup bidirectional routing between "host-only" VMWare network and the enterprise network. If I add DNS servers to /etc/resolv.conf and a default route then there is full bidirectional connectivity. Traffic flows between enterprise network and host-only network, and NAT is performed later by the enterprise WAN gateway.

However, out of the box no default route is passed over DHCP, and the DNS server provided doesn't work.

I have the following topology:

VM - -- host only network -- -- laptop VMWare host -- -- enterprise network -- -- WAN Gateway -- Internet

DHCP sets up (the laptop interface facing host only network) as the DNS server on the VM host. VMWare has a DNS proxy which works fine in NAT mode but it refuses to work in host-only mode.

So I have 2 questions:

  1. How do I configure VMWare so it sets correct DNS (either DNS known on host, e.g., a working VMWare DNS Proxy or a good static DNS e.g. Google Public DNS)

  2. How do I configure VMWare so it sets a proper default route to

  • Why wouldn't you just choose bridged mode? – SpacemanSpiff Aug 27 '12 at 13:29
  • I want vmware host to have the same static IP, even if I connect my laptop at an airport. NAT doesn't seem to be good idea either as I will need port forwarding so users from enterprise network can connect to my virtual server. – nponeccop Aug 27 '12 at 13:31
  • Makes sense then... in that case, don't use DHCP at all. use a static configuration and persistent static routes. – SpacemanSpiff Aug 27 '12 at 13:39
  • This is what I resorted to. However, it has few small flaws: 1) in case of several VMs I have to configure several times instead of one. And IP floating because of DHCP is rare and acceptable. 2) Static route configuration is somewhat cumbersome on Arch Linux I use 3) Static DNS configuration is only possible with Google DNS which admin perverts may close in their firewalls, so it's better to set whatever DNS host has which is only possible dynamically. – nponeccop Aug 27 '12 at 14:05
  • I don't see any other alternative given the inflexibility of the DHCP server that comes with workstation, unless you setup a VM just for doing DHCP for that segment :) – SpacemanSpiff Aug 27 '12 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.