I have a virtual machine with a Ubuntu 16.04 guest and two network interfaces

  • First interface: NAT

enter image description here

  • Second interface: Bridge

enter image description here

I want to access the guest from my host and I want to access a second ethernet device from the guest. The device is connected with the host over a switch. I can ping the host, the external device and my current setup from the guest, but I don´t have any internet access (chrome stucks at "resolving host").

enter image description here

When I deactivate the bridge the internet access does work, but not with the active bridge.

ifconfig gives me the following output enter image description here

What is wrong?

  • 1
    Probably the second (bridge) interface is creating an entry in /etc/resolv.conf with a bad DNS server, or pointing to a DNS server that can not reach the internet. – Stephen Harris Dec 24 '18 at 22:42
  • It was the right tip. Thank you. It works after changing the nameserver to by hand. How can I set this automatically? – Kampi Dec 24 '18 at 22:48
  • 1
    Okay, I solve the problem with the nameserver option in the network settings :) – Kampi Dec 24 '18 at 23:18
  • Maybe you can write up what you learned as an answer to the question, explaining why it went wrong and where you made changes to fix it. – Stephen Harris Dec 25 '18 at 3:10
  • Sorry, but I want test it first, because the first solution doesn´t work with apt. I have opened the network settings in ubuntu (Desktop -> Edit Connections -> Select the NAT interface -> Edit -> IPv4-Settings -> add, in the field "Additional DNS-Server" This works with chrome and apt. Modify the DNS-Server by hand over resolve.conf doens´t work for apt, but with chrome...don´t understand why, but this solution is a little bit better than the "hacky" way :) – Kampi Dec 25 '18 at 8:20

The solution is to add this in the network settings

enter image description here

I can access the internet, my host and the external device with these settings and the network configuration from above.

Your Answer

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

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