我正在尝试使用我的Ubuntu笔记本电脑连接到内部客户端网络,但客户端使用Nortel的Contivity VPN,因此它仅适用于Windows。我的想法是使用VirtualBox和Windows XP Guest建立VPN连接,然后使用Windows XP作为路由器通过VPN路由来自我的Ubuntu主机的流量。
我将VirtualBox中的第一个适配器配置为NAT,以便轻松访问Internet。我将第二个适配器配置为“仅限主机”,因此我现在可以在Ubuntu主机上看到一个新的vboxnet0
接口,在Windows Guest中看到第二个适配器,我使用静态IP配置了该接口。
我已经确认我可以将Ubuntu ping到Windows,将Windows ping到Ubuntu。
路由表如下所示:
C:\Documents and Settings\val>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 55 ee 35 ...... AMD PCNET Family PCI Ethernet Adapter #2 - Packet Scheduler Miniport
0x3 ...08 00 27 5f 3e 93 ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
0x4 ...44 45 53 54 42 00 ...... Nortel IPSECSHM Adapter - Packet Scheduler Miniport
0x5 ...00 00 00 00 00 01 ...... AGN Virtual Network Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 20
10.0.2.0 255.255.255.0 10.0.2.15 10.0.2.15 20
10.0.2.15 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.2.15 10.0.2.15 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.56.0 255.255.255.0 192.168.56.2 192.168.56.2 20
192.168.56.2 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.56.255 255.255.255.255 192.168.56.2 192.168.56.2 20
224.0.0.0 240.0.0.0 10.0.2.15 10.0.2.15 20
224.0.0.0 240.0.0.0 192.168.56.2 192.168.56.2 20
255.255.255.255 255.255.255.255 10.0.2.15 10.0.2.15 1
255.255.255.255 255.255.255.255 192.168.56.2 5 1
255.255.255.255 255.255.255.255 192.168.56.2 4 1
255.255.255.255 255.255.255.255 192.168.56.2 192.168.56.2 1
Default Gateway: 10.0.2.2
===========================================================================
Persistent Routes:
None
192.168.56.2
是连接到Ubuntu主机端192.168.56.1
的第二个适配器。
现在,当我建立VPN连接时,路由表由Contivity更改,我无法再ping主机,主机无法ping客户端。以下是运行VPN的路由表:
C:\Documents and Settings\val>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 55 ee 35 ...... AMD PCNET Family PCI Ethernet Adapter #2 - Packet Scheduler Miniport
0x3 ...08 00 27 5f 3e 93 ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
0x4 ...44 45 53 54 42 00 ...... Nortel IPSECSHM Adapter - Packet Scheduler Miniport
0x5 ...00 00 00 00 00 01 ...... AGN Virtual Network Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 21
0.0.0.0 0.0.0.0 192.168.32.29 192.168.32.29 1
10.0.2.0 255.255.255.0 10.0.2.15 10.0.2.15 20
10.0.2.0 255.255.255.0 192.168.32.29 192.168.32.29 1
10.0.2.15 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.2.15 10.0.2.15 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.32.0 255.255.248.0 192.168.32.29 192.168.32.29 30
192.168.32.29 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.32.255 255.255.255.255 192.168.32.29 192.168.32.29 30
192.168.56.0 255.255.255.0 192.168.56.2 192.168.56.2 20
192.168.56.0 255.255.255.0 192.168.32.29 192.168.32.29 1
192.168.56.2 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.56.255 255.255.255.255 192.168.56.2 192.168.56.2 20
192.197.71.160 255.255.255.255 10.0.2.2 10.0.2.15 1
224.0.0.0 240.0.0.0 10.0.2.15 10.0.2.15 20
224.0.0.0 240.0.0.0 192.168.56.2 192.168.56.2 20
224.0.0.0 240.0.0.0 192.168.32.29 192.168.32.29 1
255.255.255.255 255.255.255.255 10.0.2.15 10.0.2.15 1
255.255.255.255 255.255.255.255 192.168.32.29 192.168.32.29 1
255.255.255.255 255.255.255.255 192.168.56.2 5 1
255.255.255.255 255.255.255.255 192.168.56.2 192.168.56.2 1
Default Gateway: 192.168.32.29
===========================================================================
Persistent Routes:
None
通过查看路由表,我无法理解为什么我失去了ping 192.168.56.1
的能力,所以我很感激一些帮助,或者有关如何进一步解决这个问题的想法。
答案 0 :(得分:1)
我正在使用类似的方法:
只要VPN软件没有关闭所有非vpn连接,这就有效。我知道(和使用)的唯一软件是 Cisco VPN连接器 - 也许Nortel也是如此。
为了便于设置和使用,我设置了一台带有大量别名网络接口和专用IP的Linux机器,并将这种别名ip直接重定向到vpn网络上的目标。可以这么说:我将VPN机器桥接到本地网络上的IP。