Ubuntu – Can’t ping VirtualBox Server Operating System

networkingservervirtualbox

I am using a 13.10 Ubuntu client and I have installed a 12.04 Server with the help of VirtualBox. I am new user of Linux and this is my first Server that I am trying to create for experimentation purposes. I am trying to ping the server from the client but I keep getting this message when I terminate the process:

PING 10.0.2.15 (10.0.2.15) 56(84) bytes of data.
^C
--- 10.0.2.15 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 7999ms

But when I ping the server from his own terminal:

PING 10.0.2.15 (10.0.2.15) 56(84) bytes of data.
64 bytes from 10.0.2.15: icmp_req=1 ttl=64 time=0.176 ms
64 bytes from 10.0.2.15: icmp_req=2 ttl=64 time=0.049 ms
64 bytes from 10.0.2.15: icmp_req=3 ttl=64 time=0.049 ms
64 bytes from 10.0.2.15: icmp_req=4 ttl=64 time=0.049 ms
64 bytes from 10.0.2.15: icmp_req=5 ttl=64 time=0.049 ms
64 bytes from 10.0.2.15: icmp_req=6 ttl=64 time=0.049 ms
64 bytes from 10.0.2.15: icmp_req=7 ttl=64 time=0.049 ms
^C
--- 10.0.2.15 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6008ms

I have been searching on the net for possible similar problems and I found that maybe the firewall is blocking the requests. I disabled the firewall and I set all requests to ACCEPT.

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

I also used sudo ufw disable but still I can not ping my server.

By applying traceroute -n 10.0.2.15 I get the following response:

traceroute to 10.0.2.15 (10.0.2.15), 30 hops max, 60 byte packets
1  193.11.184.1  1.622 ms  1.597 ms  2.477 ms
2  194.47.128.72  3.308 ms  3.314 ms  3.310 ms
3  194.47.128.237  3.816 ms  3.822 ms  4.157 ms
4  * * *
5  * * *
6  * * *
7  * * *
8  * * *
9  * * *
10  * * *
11  * * *
12  * * * 
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

I know that probably is a small configuration that I might need to adjust but since I am not familiar with this area I am completely lost.

Any suggestions would be much appreciated.

Best Answer

That looks very much like you are using the wrong network mode for virtual box. Typically the guest cannot be reached from "outside" when using NAT (and the host is "outside" too).

You should use either "host only" if you want your guest to be completely hidden from outside - or "bridged mode" to have it be a part of the outside network.

Related Question