Access VirtualBox Guest via Host

Go to VirtualBox Preferences and under "Network", add host-only network. This will add a new vboxnet0 interface, which comes up as "192.168.56.1/24"

In the Guest Settings, add the "Host-only" to a second "Network Adapter"

Once Guest boots up, assign a static IP to the second adapter.

For Debian based servers, edit /etc/network/interfaces and add the below, which should bring up the network upon reboot:

auto eth1
iface eth1 inet static
address 192.168.56.101
netmask 255.255.255.0

You should now be able to ping and ssh to the guest via the host server on the second interface.

Post new comment

  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Comment