首页 文章

Ubuntu:可以使用NAT进行't connect to host'的互联网连接

提问于
浏览
4

我在Virtualbox上安装了Lubuntu . 我使用的是Windows 7 x64 . 我的VM是32位版本 . 互联网使用桥接适配器工作,但我正在尝试使用NAT,所以我可以使用VPN . 在Windows的网络和共享中心,我看到连接“VirtualBox Host-Only Connection”,它显示“无法访问Internet” . 在属性中,选中“VirtualBox桥接网络驱动程序” . 以下是ifconfig的输出:

dev@dev-VirtualBox:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:f3:48:24  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fef3:4824/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:379 errors:0 dropped:0 overruns:0 frame:0
          TX packets:421 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:32105 (32.1 KB)  TX bytes:34987 (34.9 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:856 errors:0 dropped:0 overruns:0 frame:0
          TX packets:856 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:56432 (56.4 KB)  TX bytes:56432 (56.4 KB)

路由表:

dev@dev-VirtualBox:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        *               255.255.255.0   U     1      0        0 eth0
dev@dev-VirtualBox:~$

连接编辑器:常规:自动连接到此网络不可用时,所有用户可以连接此网络以太网:MTU自动IPV4:自动(DHCP),需要ipv4寻址此连接才能完成IPV6:忽略

dev@dev-VirtualBox:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

1 回答

相关问题