VPN sharing on Mac OS X 10.5 machine
Posted
by
Jens
on Super User
See other posts from Super User
or by Jens
Published on 2010-10-19T16:01:09Z
Indexed on
2010/12/29
1:56 UTC
Read the original article
Hit count: 284
I have a rather weird problem. I want to share a VPN connection that has been established by my Mac OS X 10.5 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 (192.168.178.30), a fixed one to the other machine (192.168.178.60) and my computer's IP address as gateway on the other machine.
I connected to my VPN using the internal Mac OS X VPN client (PPTP 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
Now everthing works smootly, however speed is an issue. I get 1,8 MBit/s on my main machine and only 0,3 - 0,6 MBit/s on the other one.
My question: What could possibly be wrong? Do I have to tweak MTU settings, is there any packet inspection ongoing that needs time....? Any help appreciated!
© Super User or respective owner