I am running OSX with a windows server 2008 guest in Virtualbox. My goal is to route some of the network traffic in the host through the server guest. This is because the win2008 server has a VPN connection to my workplace using a Smartcard solution which can not operate on OSX.
My current set-up is like this:
- connected to the internet via en01
- connected to the internet using NAT (lan1 in guest)
- has a SSTP VPN connection to my workplace
- is connected to the guest using an Host Only Adapter vboxnet0 (LAN2 in guest)
The important part is about the host (OSX). Primarily I want all network traffic to just go through en01. However, all traffic which can only be accessed through the VPN must go through the guest and through the VPN. I have one specific FQDN which can only be accessed through the VPN (say corp.mycompany.com).
I do not know much about networking. I thought I would be able to get it to work by
- bridging together LAN2 and LAN1 but this didn't seem to work
- this: http://archives.aidanfindlater.com/blog/2010/02/03/use-vpn-for-specific-sites-on-mac-os-x/
- using a loopback adapter on WinXP (when I did not have win2008 yet, but this doesn't work because I can't create a PPTP connection)
And I've also read about Routing and Remote Access but I have no idea on how to use this.
Can someone help me in the right direction?
Update nov-23 I've configured Routing and Remote Access as a NAT router. Now I can tell OSX using route add to route specific hosts through WIN2008. However, when I connect to the VPN (in the WIN2008 guest) the routing doesn't work anymore..
So I guess my question now is: how can I create a set-up like this: OSX --> vboxnet0 --> LAN1(win) -(route)-> VPN and back of course
Or maybe I should create an VPN server on the windows machine and connect from OSX to this VPN which will forward all requests to an VPN connection of itself (the corporate VPN). OSX in that case should use split tunneling(?).