Page 1 of 1

Virtual box cant ping anything

Posted: 12. Dec 2014, 00:48
by merijndk
Hello,

I'm a total newby with virtual box and to nearly everything server related. Since a few weeks some school projects require me to run virtual box and install some stuff on it. I also need cURL. To install this I try to give my virtual box an internet connection so it can download the needed software. To do so I do the following:

I start up my server with the network settings:
adapter 1:
Host only adapter

Adapter 2:
Nat
All the other fields on nat are gray so I didnt fill in anything else.

I start the server and log in with my name and password. all works fine.
I type 'sudo su' to login on the root and fill in my password. No error message so I asume it good.
I type 'ifconfig eth1 up' to enable the network. no error message
I type 'dhclient eth1' no error message,

Now when I try to ping google it says:
ping: unknown host google (cant spell out the domain name because im new on the form but you get the . com ;))

It all works fine for my classmates and we have the same settings. Does anyone knows what could be wrong?

NOTE: running virtual box 4.3.18

Hope to hear soon! Greetings,
Merijn de Klerk

Re: Virtual box cant ping anything

Posted: 12. Dec 2014, 02:00
by mpack
Ping doesn't always work reliably over NAT. Also not all host respond to a ping. E.g. Win7+ hosts don't. If this answer isn't appropriate then try to narrow your question.

Re: Virtual box cant ping anything

Posted: 14. Dec 2014, 14:11
by merijndk
Thanx for the reply.

Well I want to connect virtual box to the internet to install cURL. The above works for all my clasmmates but not for me. Should I set the network setting to something else than NAT or?
I have no clue what I have to do so im wondering what I could be doing wrong. Also tried disabling my firewall but doesnt work either.

Hope anyone has a suggestion of what to do.

Thanx!

Re: Virtual box cant ping anything

Posted: 14. Dec 2014, 15:20
by socratis
You haven't said anything about your host or your guest as per the Minimum information needed for assistance (please read it). On top of what's asked for in the link, I'd like to see the output from the following commands.
  • Host
    Open a Command Prompt window. Navigate to the VBox installation directory (typically "C:\Program Files\Oracle\VirtualBox\"). Run:
    VBoxManage list dhcpservers
  • Guest
    You don't mention the guest type, but I assume it's a Linux based one, since you used the 'ifconfig' command. Open a terminal and run:
    ifconfig