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

How to capture Genymotion network traffic with VBoxManage

Updated September 08, 2017 08:02 AM

Network was no work in ubuntu14 on VirtualBOX

Updated April 19, 2017 06:02 AM