Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to share a VPN connection that has been established by my Mac OS X 10.7.2 computer with another machine in my network. This is what I did:

In the /etc/hostcongig file on the main computer I added the line: IPFORWARDING=-YES-

I assigned a fixed IP address to my computer intended to run the VPN connection (, a fixed one to the other machine to share it ( and my computer's IP as gateway on the other machine.

I connected to my VPN using the internal Mac OS X VPN client (L2TP connection)

I run this script:


natd -same_ports -use_sockets -unregistered_only -dynamic -interface ppp0 -clamp_mss
ipfw -f flush
ipfw add divert natd ip from any to any via ppp0
ipfw add pass all from any to any
sysctl -w net.inet.ip.forwarding=1

And nothing ever happens. I have verified I can use the computer as a gateway since I just use natd -interface en0 and all is well. I have heard people having the above work with PPTP is L2TP the problem?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.