Connect host to guest with VirtualBox on Host-Only-Network-Adapter

by ZelelB   Last Updated April 25, 2015 21:00 PM

I am using Ubuntu on VirtualBox as guest, on a Windows 7 host.

I would like to have this configuration: 1) both guest and host connected to internet. 2) guest can reach host (through ping) 3) host can reach guest (through ping)

I setup a Host-Only-Network on the VirtualBox before importing the image of Debian, and then imported it, and everything worked fine with the internet. I got directly internet.

My Settings for the "VirtualBox Host-Only Ethernet Adapter" are the following:



Here is the content of etc/network/interfaces:

The loopback network interface

auto lo

iface lo inet loopback

The primary network interface

allow-hotplug eth0

iface eth0 inet dhcp

The DHCP-Server is unchecked (disabled)

Now when I ping the windows host from the Debian guest, typing "ping" (I hope I am really pinging the guest here..) everything goes fine and the packets are sent back.

How can I ping the guest Debian from Windows now? Which address should I ping? How could I know and set the IP of the Guest Debian?


Answers 1

Here is the solution..

I added this part to this file: /etc/network/interfaces

# new network
auto eth1
iface eth1 inet static

then I had to enter this line on the Terminal:

/etc/init.d/networking restart

and then I had to restard the virtual machine!

April 25, 2015 18:16 PM

Related Questions

VirtualBox - "host-only" with internet

Updated August 03, 2017 23:02 PM

Alfa AWUS036NHA not detected by Virtual Box

Updated October 12, 2018 15:02 PM

Ubuntu DHCP server doesn't give a fixed address

Updated December 10, 2018 21:02 PM

How to capture Genymotion network traffic with VBoxManage

Updated September 08, 2017 08:02 AM