I am trying to run an Ubuntu Server 16.04 guest in an Ubuntu 15.10 host with Host Only networking in VirtualBox. I am aware there are few questions with similar problems, their configuration isn't quite the same as mine and I'm still stuck after reading them.

The guest can ping and fetch data from both the host and external websites.

The host cannot ping the guest or connect to any web service running on the guest.

I am following these instructions with some details changed.

In VirtualBox

One Host-Only network created, vboxnet0 with address and network mask

Guest has NAT for adapter 1 (default setting) and vboxnet0 as adapter 2.

On the Host

#> ifconfig vboxnet0
vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00
      inet addr:  Bcast:  Mask:

On the Guest

This is /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# Host-only interface
# vboxnet0 Host Only Adapter has address
# guest has address
auto enp0s8
iface enp0s8 inet static

# NAT interface
auto enp0s3
iface enp0s3 inet dhcp

The interface names are not eth0 etc, apparently this is due to kernel evolution and it should be fine.

After a reboot, this is ifconfig

enter image description here

This seems to show the correct inet addr for enp0s8 (which is the Host Only adapter), and enp0s3 is NAT which appears to be working.

If I run route

enter image description here

I don't know how to interpret this exactly, but for some reason it lists instead of, which is what ifconfig and /etc/network/interfaces have.

EDIT in an earlier version of this question, the static IP of the guest wasn't within the netmask range of the Host Only adapter. Then, ping seemed to hang, now ping from the host produces

PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable

What's wrong? Thanks.

  • I imagined would be reachable because of the existence of vboxnet0, that's it's raison d'etre (I have not idea why it's .0 in route). And I have no idea what you mean about the netmask, is supposed to be the gateway, I believe. – spraff Sep 12 '16 at 0:13
  • Apologies if I was unclear. To rephrase, why do you think I would want as the address? The scheme I'm going for is 192.168.100.n is the nth machine, with n starting from 1, so far there's only one machine (guest). – spraff Sep 12 '16 at 9:15
  • I managed to figure out what was wrong but you're really being incredibly unhelpful. You basically just scorned me for knowing less than you while giving no insight into why any of the above is wrong. Please take a moment to reflect on how that comes across in a community designed for helping people. – spraff Sep 12 '16 at 12:06

It started working when I changed vboxnet0 to have an IP address of instead of

0 is a reserved IP address for the network (when the mask is

Change the host address ( or

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.