Routing VirtualBox、路由和VPN上的Windows

Routing VirtualBox、路由和VPN上的Windows,routing,vpn,virtualbox,Routing,Vpn,Virtualbox,我试图用我的Ubuntu笔记本电脑连接到一个内部客户端网络,但是客户端使用北电的Contivity VPN,所以它只在Windows下工作。我的想法是使用VirtualBox和Windows XP Guest建立VPN连接,然后使用Windows XP作为路由器,通过VPN路由来自Ubuntu主机的流量 我将VirtualBox中的第一个适配器配置为NAT,以便于访问Internet。我将第二个适配器配置为“仅主机”,因此我现在可以在Ubuntu主机上看到一个新的vboxnet0接口,在Wind

我试图用我的Ubuntu笔记本电脑连接到一个内部客户端网络,但是客户端使用北电的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主机端的第二个适配器

现在,当我建立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
的能力,因此我希望得到一些帮助,或者了解如何进一步解决此问题。

我正在使用类似的方法:

  • 一个桥接网络接口
  • windowsxp上的VPN软件
  • Windows上的路由(NAT)
  • 在我的主机(Linux)上设置目标网络的路由(从Windows上的VPN)
只要VPN软件未关闭所有非VPN连接,此功能就可以工作。我所知道(并使用)的唯一软件是思科VPN连接器——也许北电也会这样做


为了便于安装和使用,我设置了一台linux机器,它有许多带有专用ip的别名网络接口,并将对此类别名ip的访问直接重定向到vpn网络上的目标。可以这么说:我将VPN机器桥接到本地网络上的IP。

您的意思是,Cisco VPN关闭所有无VPN流量?取决于服务器设置,但可以。这不是一个bug,这是一些客户所需要的特性