在下面視訊盒我有一個基於 ubuntu 的虛擬機網路位址轉換
我習慣像下面這樣在 vbox 上進行連接埠轉送配置
Name Protocol IP host Port host IP Guest Port Guest
myrule TCP 3000 3000
但是當在連接埠 3000 上執行我的網路應用程式時;我無法在主機的瀏覽器中打開它。 (並且它在我的來賓虛擬機中表現不佳)
ifconfig
在我的來賓虛擬機器中顯示以下內容:
ifconfig
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.3.15 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::b612:8769:ba28:6e2e prefixlen 64 scopeid 0x20<link>
ether 08:00:27:42:89:7b txqueuelen 1000 (Ethernet)
RX packets 3354 bytes 2134154 (2.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2669 bytes 373394 (373.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Boucle locale)
RX packets 229607 bytes 231076789 (231.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 229607 bytes 231076789 (231.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
和我的/etc/網路/接口文件看起來像這樣:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
建議?