Host: Linux Lubuntu 16.04 64-bit (fully updated)
Guest: Linux Ubuntu Server 14.04 64-bit (fully updated)
If I set the guest's networking to Bridged Adapter, the guest can access the internet, and my host is able to access the guest's website.
However, when I set the guest's networking to Host-only Adapter, the guest (obviously) cannot access the internet, but unfortunately my host cannot access the guest's website.
(This used to work before I had to reinstall Linux on my host.)
On the host
I have edited /etc/hosts to include the following lines (where acme.com is the name of the website).
Code: Select all
192.168.56.101 acme.com
192.168.56.101 www.acme.com
File > Preferences > Network > Host-only Networks…
I created a new host-only network, with the following settings.
- Adapter: I used the default settings as follows.
IPv4 Address: 192.168.56.1 IPv4 Network Mask: 255.255.255.0 IPv6 Address: (blank) IPv6 Prefix Length: (blank)
- DHCP Server:
Enable Server Server Address: 192.168.56.100 Server Mask: 255.255.255.0 Lower Address Bound: 192.168.56.101 Upper Address Bound: 192.168.56.254
Settings > Network > Adapter 1…
Enable Network Adapter
Attached to: Host-only Adapter
Name: vboxnet0
Advanced…
Adapter Type: Intel PRO/1000 MT Desktop (82540EM)
Promiscuous Mode: Deny
MAC Address: 0800270726DD (randomly generated)
Cable Connected
In the guest itself
I have tried two modes.
Mode 1:
Running as default. ifconfig (in the guest) shows IP address 192.168.56.101.
Mode 2:
Edit the guest's /etc/network/interfaces to use a static IP address 192.168.56.66, and the host's /etc/hosts to use 192.168.56.66 instead of 192.168.56.101. ifconfig (in the guest) shows IP address 192.168.56.66.
In both modes, the host is unable to see the guest's website.
What am I doing wrong, and how can I fix it, please?