0

I have configured the Ubuntu server (guest) with NAT adapter and configured it in /etc/network/interfaces like below:

auto enp0s3
iface enp0s3 inet dhcp

But doesn't connect to internet:

ping www.google.com
ping: unknown host www.google.com

The host machine is a Windows7 with the firewall disabled. How can I solve this problem?

2 Answers2

2

You may need to include your DNS entries, manually. Try adding this line to your configuration. Note that these DNS servers are Google's, and will not be able to provide DNS for your local LAN, but will provide DNS for accessing sites on the Internet..

dns-nameservers 8.8.8.8 8.8.4.4

Reference: https://www.swiftstack.com/docs/install/configure_networking.html

DaneM
  • 376
0

I found a solution on internet. The idea is to execute next instruction:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

This replaces the nameserver (DNS) used on the machine by the Google Public DNS service.