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.
One Host-Only network created,
vboxnet0 with address
192.168.100.0 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:192.168.100.0 Bcast:192.168.100.255 Mask:255.255.255.0
On the Guest
# The loopback network interface auto lo iface lo inet loopback # Host-only interface # vboxnet0 Host Only Adapter has address 18.104.22.168 # guest has address 192.168.100.1 auto enp0s8 iface enp0s8 inet static address 192.168.100.1 netmask 255.255.255.0 network 192.168.100.0 broadcast 192.168.56.255 # 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
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
I don't know how to interpret this exactly, but for some reason it lists
192.168.100.0 instead of
192.168.100.1, which is what
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 192.168.100.1 from the host produces
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data. From 192.168.100.0 icmp_seq=1 Destination Host Unreachable
What's wrong? Thanks.