无法 ping VirtualBox Server 操作系统

Tha*_*nos 5 server virtualbox networking

我使用的是 13.10 Ubuntu 客户端,并且在 VirtualBox 的帮助下安装了 12.04 服务器。我是 Linux 的新用户,这是我为实验目的而尝试创建的第一台服务器。我正在尝试从客户端 ping 服务器,但在终止进程时我不断收到此消息:

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
Run Code Online (Sandbox Code Playgroud)

但是当我从他自己的终端 ping 服务器时:

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
Run Code Online (Sandbox Code Playgroud)

我一直在网上搜索可能的类似问题,我发现可能是防火墙阻止了请求。我禁用了防火墙,并将所有请求设置为 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
Run Code Online (Sandbox Code Playgroud)

我也使用过,sudo ufw disable但仍然无法ping通我的服务器。

通过申请,traceroute -n 10.0.2.15我得到以下回复:

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  * * *
Run Code Online (Sandbox Code Playgroud)

我知道这可能是我可能需要调整的一个小配置,但由于我不熟悉这个领域,我完全迷失了。

任何建议将不胜感激。

gun*_*ert 6

这看起来很像您为虚拟盒使用了错误的网络模式。通常,使用 NAT 时无法从“外部”访问来宾(主机也在“外部”)。

如果您希望您的访客完全隐藏在外部,您应该使用“仅主机”或“桥接模式”使其成为外部网络的一部分。