Routing traffic from Linux through a VirtualBox Windows install

routingvirtualboxvpn

I am trying to connect to an internal client network with my Ubuntu laptop, but the client uses Nortel's Contivity VPN, so it only works in Windows. My idea is to use VirtualBox with Windows XP Guest for establishing the VPN connection, and then using Windows XP as a router to route traffic from my Ubuntu Host via the VPN.

I configured the first adapter in VirtualBox to be a NAT, to make Internet access easy. I configured the 2nd adapter as "Host-only", so I can now see a new vboxnet0 interface on Ubuntu Host, and a 2nd adapter in Windows Guest, which I configured with a static IP.

I've verified that I can ping Ubuntu to Windows and Windows to Ubuntu.

The routing table looks like this:

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 is the 2nd adapter that is connected to 192.168.56.1 on the Ubuntu Host side.

Now, when I establish the VPN connection, the routing table is changed by Contivity and I can no longer ping the host, and the host can't ping the guest. Here is the routing table with VPN running:

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

By looking at the routing table, I can't see why I'm losing ability to ping 192.168.56.1, so I'd appreciate some help, or ideas on how to further troubleshoot this.

Best Answer

Split tunneling has probably been disabled as part of the VPN policy - standard security practice. You might check with your VPN administrator(s) to see if split tunneling can be allowed for your VPN sessions (you might not want to hold your breathe as slit tunneling is generally consider poor security practice).