Progmar Marcin Załęczny


Bridging host and guest in VirtualBox (in Ubuntu 16.04 and above)

Activate File->Preferences... menu. This cause "VirtualBox - Preferences" window to appear. In the left column select "Network" option, in the tabs in the center of the window select "Host-only Networks" tab and in the right part of the window click small icon "Adds new host-only network" to add a new network:

When in the list at the center of the window appear "vboxnet0" network - click OK button. Next in the VirtualBox' main window select guest virtual machine on the left side and click "Network" header on the bottom center:

Network configuration window will appear. There switch to the "Adapter 4" tab (or first accessible tab) in the right tab panel and select "Enable Network Adapter" option. From the "Attached to" combobox choose "Host-only Adapter" item and from the "Name" combobox choose "vboxnet0" item that was added above:

In the end configure network adapter created. To do this add following configuration text to the /etc/network/interfaces file. The configuration is valid for the "Adapter 4" tab. For "Adapter 1" tab instead of eth3 you should use eth0, for tab 2 you should use eth1 and for tab 3 you should use eth2:

auto eth3
iface eth3 inet static
Restart virtual machine. If you don't know what IP address type in above check the host's IP address. Open terminal and issue ifconfig command. The host's IP address connected to virtual machine you can read from the vboxnet0 section. Note that the vboxnet0 interface will be created in the host after first run of virtual machine.

Bridging host and guest in VirtualBox (in Ubuntu 15.10 and below)

  • In the VirtualBox'es main window click the header "Network":
  • Network configuration window will be opened. There in the right panel switch to tab "Adapter 2" and check the option "Enable Network Adapter". In the field "Attached to" choose "Bridged Adapter" option. In the field "Name" select network interface which connects a host system with guest system and press "OK" button: