【问题标题】:Windows on VirtualBox, Routing and VPN [closed]VirtualBox、路由和 VPN 上的 Windows [关闭]
【发布时间】:2011-11-16 19:08:24
【问题描述】:

我正在尝试使用我的 Ubuntu 笔记本电脑连接到内部客户端网络,但客户端使用 Nortel 的 Contivity VPN,因此它仅适用于 Windows。我的想法是使用 VirtualBox 和 Windows XP Guest 来建立 VPN 连接,然后使用 Windows XP 作为路由器通过 VPN 路由来自我的 Ubuntu 主机的流量。

我将 VirtualBox 中的第一个适配器配置为 NAT,以便轻松访问 Internet。我将第二个适配器配置为“仅限主机”,因此我现在可以在 Ubuntu 主机上看到一个新的 vboxnet0 接口,并在 Windows Guest 中看到一个第二个适配器,我配置了一个静态 IP。

我已经验证我可以 ping Ubuntu 到 Windows 和 Windows 到 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,因此我希望能得到一些帮助,或者提供有关如何进一步解决此问题的想法。

【问题讨论】:

    标签: routing vpn virtualbox


    【解决方案1】:

    我正在使用类似的方法:

    只要 VPN 软件没有关闭所有非 vpn 连接,它就可以工作。我知道(并使用)的唯一软件是 Cisco VPN Connector - 也许北电也是如此。

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

    【讨论】:

    • 你的意思是 Cisco VPN 关闭了所有 No VPN 流量?
    • 取决于服务器设置,但可以。这不是错误,这是某些客户需要的功能
    猜你喜欢
    • 2016-02-08
    • 1970-01-01
    • 1970-01-01
    • 2013-07-23
    • 2018-10-12
    • 2010-09-06
    • 2019-11-03
    • 2023-01-27
    • 2023-03-28
    相关资源
    最近更新 更多