I've got a VMbox ruining Ubuntu set up to use host only and NAT networking.

The issue is that the nat network can not connect NAT networking
I've set the interfaces as shown below:

GNU nano 2.8.6                   File: /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5). 

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# Host-only interface
auto enp0s3
iface  enp0s3 inet dhcp

auto enp0s8
iface eth2 inet dhcp

Is there any issue with the above file?

  • You'll need to post the output of ip addr, just the /etc/network/interfaces output isn't really enough to help here. What's the actual issue? Is the guest getting an IP? Are you not able to load web-pages? What about DNS, does it resolve google.com to an IP? Can you ping things like – Andrew Feb 26 '18 at 19:41
  • Why do you say eth2? That doesn't seem to be the name of the interface. – Michael Hampton Feb 26 '18 at 19:47

We really would need to see the output of of ip addr to know more, but as pointed out by @Michael Hampton in the comments, your configuration doesn't line up with the way the system is configured.

This block could indicate that you have a second interface being detected by the system with the name of enp0s8 (without ip addr we can't confirm).

auto enp0s8

But, you've setup eth2 to be DHCP instead

iface eth2 inet dhcp

This isn't going to work if the interface isn't known as eth2.

Instead, try this:

auto enp0s8
iface enp0s8 inet dhcp

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.