我有Debian VM,不能在外面ping它并访问内部的互联网。重要的要求是有ip地址来监听在Debian上运行的服务器。
默认情况下,我的配置如下所示
我的主机ipconfig:
Ethernet adapter Local Area Connection 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Wireless Network Connection 4:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::a8b6:1fcc:cc1e:84d8%15
IPv4 Address. . . . . . . . . . . : 192.168.0.106
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : ef.com
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::1111:f5d3:1a86:f6b%19
Autoconfiguration IPv4 Address. . : 169.254.15.107
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter VirtualBox Host-Only Network #2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::3828:a1eb:e880:5f76%20
IPv4 Address. . . . . . . . . . . : 192.168.106.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
我在本地网络中添加了静态IP到VM。之后看起来像这样:
但是,我仍然无法连接网络表单VM并且可以从主机ping这个ip。我误解了什么吗?只需桥接VM设置和可用列表中的IP就足够了