Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Scenario:

I have a Mac running Lion that is connected to an OpenVPN server I have a Windows XP VM (running on parallels, but I don't think this is important) I want to be able to route traffic from the XP VM via the host Mac's OpenVPN connection so that I can log on to a domain.

The remote network is 172.16.0.0/23 (255.255.254.0) Open VPN is configured to supply address in the 10.100.101.0/24 range and sets up the routing to 172.16.0.0 using the gateway 10.100.101.1/32 My local network is 192.16.1.0/24

NOTE: I do not want to install OpenVPN into the XP virtual machine as I would have to use a passwordless key in order for OpenVPN to connect before logon.

Anyone got any ideas?

share|improve this question
add comment

2 Answers

So I figured this out (for my needs at least) and it was a lot simpler than I first thought.

Initially I over thought the problem and tried to use bridged networking, making my host the gateway and then attempting to route the traffic to the tun0 adapter - waste of time.

Solution:
In the device menu in parallels just set the network to 'shared'. In the XP (or whatever) VM manually set the DNS to the address of your domain controller (so in my case 172.16.0.254). Connect to OpenVPN on the Host, I use Tunnelblick to manage this on OS X. OpenVPN should add the correct routes for you.

There is no reason this should not work for VirtualBox or VMWare on Linux or Windows host too.

That is it.

share|improve this answer
add comment

This is not an answer, but I see no way to comment of PM withakay. I think what I am missing here is only what my domain controller would be. I know my way around my mac, and I set up the VPN server so I know some details of it, but I cannot figure out what I should plug into the Windows DNS settings for it to magically go through the VPN (in my case, a simple PPTP VPN via the OS, Mac OS Mavericks). Thanks for any help! (Before deleting my non-answer.)

Here is my own question on this: http://apple.stackexchange.com/questions/96071/how-to-route-only-parallels-over-vpn

Or I think I know how to give the VPN server's IP address as the DNS server for the VM, which does go through the VPN (there is no such address when there is no connection), but I worry that the VM simply resolve the public DNS into a public IP and connect without going through the VPN?!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.