Route specific network traffic through vpn in virtualbox guest

Posted by Sander on Server Fault See other posts from Server Fault or by Sander
Published on 2012-11-22T16:34:22Z Indexed on 2012/11/22 17:00 UTC
Read the original article Hit count: 242

Filed under:
|
|

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:

  1. OSX (Host):

    • connected to the internet via en01
  2. Win2008 (Guest):

    • 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

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?

© Server Fault or respective owner

Related posts about vpn

Related posts about virtualization