2
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 (10.0.1.3), a fixed one to the other machine to share it (10.0.1.7) and my computer's IP 10.0.1.3 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:
#!/bin/sh
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 10.0.1.3 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?