Configuring VPN Server on OS X 10.8.2 as Router with NAT !
Posted: Tue Oct 02, 2012 10:24 pm
Until today i could not google the information how to configure a VPN Server on OS X 10.8.2 as a router with NAT. The network traffic has to be routed from network interface "tun01" to "en0" (in most cases the interface of the network cable). In all located informations there is one required command missing. Without this command the VPN Server does not act as router with NAT for forwarding an request to the Gateway of the Servers LAN.
The commands for configuring a VPN Server on OS X 10.8.2 to work as a router with NAT are:
The command "sysctl -w net.inet.ip.fw.enable=1" is missing in all public hints that can be found over google.
I could solve the problem, cause there was one dependency to this system variable mentioned in the manual pages of the command "ipfw" (man ipfw). It was very difficult to find this additional dependency, and it would be great if this information can be published on many places.
Thanks.
The commands for configuring a VPN Server on OS X 10.8.2 to work as a router with NAT are:
Code: Select all
sysctl -w net.inet.ip.fw.enable=1
sysctl -w net.inet.ip.forwarding=1
natd -interface en0
ipfw add divert natd ip from any to any via en0
I could solve the problem, cause there was one dependency to this system variable mentioned in the manual pages of the command "ipfw" (man ipfw). It was very difficult to find this additional dependency, and it would be great if this information can be published on many places.
Thanks.