Host-only networking no longer words after machine reinstallation

Discussions about using Linux guests in VirtualBox.
Post Reply
Paddy Landau
Posts: 43
Joined: 22. Jul 2012, 16:47
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows, other Linux

Host-only networking no longer words after machine reinstallation

Post by Paddy Landau »

For various reasons, i had to reinstall Linux onto my machine (the host). I restored my Virtualbox guest on my new machine, but I cannot get the host-only networking mode to work.

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
In Virtualbox

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
In the guest settings

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?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Host-only networking no longer words after machine reinstallation

Post by socratis »

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Paddy Landau
Posts: 43
Joined: 22. Jul 2012, 16:47
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows, other Linux

Re: Host-only networking no longer words after machine reinstallation

Post by Paddy Landau »

socratis wrote:Take a look at #16911: hostonly network broken on 5.1.24
Thank you! I have installed the test build as instructed in the bug report, and it works again. Phew!
Post Reply