I have a Windows 7 host, and Ubuntu 16.04 as a guest operating system over VMware, I've been trying for a few days and have been unable to access the internet over the guest operating system.

My current configuration looks like this:

VM => Settings: enter image description here

Network Editor: enter image description here

ifconfig command from the Ubuntu desktop: enter image description here

ipconfig command from the Windows 7 host desktop: enter image description here

Interfaces file from /etc/network

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

My question being, is there something simple that I'm missing here that will not allow me to connect to the internet?

  • you have no gateway, add your host as gateway on the guest VM, or change from NAT to bridged.
    – warhansen
    Jul 1 '16 at 8:51
  • add your host as gateway on the guest VM What do you mean?
    – 13aal
    Jul 1 '16 at 17:23
  • @warhansen, how did you infer this?
    – guntbert
    Jul 1 '16 at 20:37
  • Your default gateway is empty on the iconfig. On you Linux host add: gateway xxx.xxx.xxx.xxx which is the Host's IP. Because your host is NAT'ed it will do the rest
    – warhansen
    Jul 4 '16 at 8:48

Edit the file /etc/network/interfaces and add these lines:

# The primary network interface
auto ens33
iface ens33 inet dhcp

ens33 is the logical name of the NIC and may be different for other operating systems.

Don't change anything of the loopback interface.

Save the file and run sudo ifup ens33.

  • 3
    This worked for me! OP should select it as correct answer. Feb 11 '17 at 21:41
  • 3
    this worked for me, too. You saved my days
    – Mr Neo
    Feb 16 '17 at 6:22
  • 2
    Finally a solution that works!! Sep 14 '17 at 8:08
  • 1
    I had to add ens34 and that did the trick. Thank you, thank you! Jan 14 '19 at 22:31

I had the same issue. I have removed all the network cards and readded them - not sure if this was a requirement but after I did that I decided to reinstall the VM Player. Then downloaded VMPlayer and ran the installer. I chose Repair then restarted the host machine.

Not the answer you're looking for? Browse other questions tagged or ask your own question.