-1

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:

IPv4-Adress: 192.168.56.254

IPv4-Subnetmask: 255.255.255.0

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 192.168.56.254" (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?

Thanks!

  • Welcome to askubuntu! As this question regards Debian, it's off topic here. – Elder Geek Apr 25 '15 at 16:52
  • ok sorry! is it not the same? it should be the same issue for this specific subject.. something with the etc/network/interfaces ... i should add something there but i dont know what exactly – ZelelB Apr 25 '15 at 16:55
  • Please review askubuntu.com/questions/ask – Elder Geek Apr 25 '15 at 16:56
  • Oww sorry! I've just seen I am using Ubuntu... o.O I will make an edit on the question – ZelelB Apr 25 '15 at 17:05
  • It is unclear what you are asking. virtualbox.org/manual/ch06.html#network_hostonly , basically this is the definition of host only. What problem are you having ? – Panther Apr 25 '15 at 17:13
2

Here is the solution..

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

# new network
auto eth1
iface eth1 inet static
address 192.168.56.101
netmask 255.255.255.0

then I had to enter this line on the Terminal:

/etc/init.d/networking restart

and then I had to restard the virtual machine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.