PDA

View Full Version : Parallels Desktop : share the primary OS VPN


rascuacho
Oct 18, 2006, 03:25 PM
Hi,

After lots of research on the internet, I found a solution to share my MacOS VPN to work with my Windows GuestOS (should work wathever the guestOS).

Create this script (I called it ppp0_sharing.sh):

#!/bin/sh
echo "Setting net.inet.ip.forwarding to 1..."
sysctl -w net.inet.ip.forwarding=1
echo "Starting natd on ppp0 interface..."
natd -interface ppp0
echo "Setting ipfw divert natd via ppp0..."
ipfw add divert natd ip from any to any via ppp0

Now, connect your MacOS VPN.

Then, run the above script with administrator priviledges:
sudo sh ppp0_sharing.sh

Now, start you GuestOS (with Networking set to Host-Only).

That's all, the GuestOS should be using the work network for everything.
(on my windows GuestOS, the Active Directory authentication works!)

I had only one problem so far: if the VPN gets disconnected for some reason, and even if I reconnect, the network does not really recover in the GuesOS, probably because I would need to "revert" the changes of the script above first, but I don't really know how. So if someone has the answer, I would love to hear about it ;)

I hope this will work for you too.