Unable to connect to internet from virtual machine

I am using Vmware Player to use Ubuntu 14.04, but I cannot connect to the Internet in my virtual machine even though my system is connected to the Internet. The original OS on my system is Windows 7. Can anyone suggest a way out.

+3


source to share


2 answers


Depending on how you are connected to the network, try either Bridged or NAT mode for the VM network adapter. Be aware that you may lose the connection from the host machine to the virtual machine. In this case, you will need a different network adapter.

In most cases NAT should work. In this case, only the IP address of your host computer is visible to your network, and the ports are allocated for the virtual machine to communicate with the outside world. The problem is that you cannot connect to the virtual machine from the host machine if you need to. Add another adapter as I mentioned above and connect to its IP address. You will have two adapters, one for the internet and one for the guest host.

In bridged mode, the virtual machine is visible to the outside network, so a network configuration is required that allows the virtual machine to obtain an IP address and participate in the network (for example, network administrators can block unknown MAC addresses). The host machine talks to the virtual machine like a computer on a network.

Update your question with more information if my suggestion doesn't work: guest OS, how is your host machine connected to the network, what is the current VM network adapter configuration. Is this a home or work computer?

UPDATE

So I guess if you are connected to a corporate LAN then NAT will work until Bridge is down. To add another interface 1) add an adapter to VMWare Player ; 2) Add the interface to Ubuntu. Assuming the existing interface is eth0, edit / etc / network / interfaces adding the following lines:



auto eth1
iface eth1 inet dhcp

      

Then restart the network service:

sudo /etc/init.d/networking restart

      

UPDATE 2

Another reason why you are unable to connect to the Internet might be a proxy server. Make sure the proxy configuration in the virtual machine is the same as on the master machine.

+1


source


CLose VM,
Go to virtual machine settings and network adapters
Then click on adapter 1 and select NAT Shared Network.



Start virtual machine

0


source







All Articles