Changes between Version 5 and Version 6 of NatHack
- Timestamp:
- 01/28/11 10:48:23 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NatHack
v5 v6 20 20 all these are copied from the !linnat irc "command" when you're in #openvpn on freenode: 21 21 22 Ass -U-me-ng that you have '''eth0''' as the network card you want as "uplink" and 10.8.0.x is the vpn network:22 Assuming that you have '''eth0''' as the network card you want as "uplink" and 10.8.0.x is the vpn network: 23 23 {{{ 24 24 iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE … … 28 28 iptables -t nat -I POSTROUTING -o eth0 -j SNAT --to <IP ADDRESS> 29 29 }}} 30 or see [http://netfilter.org/documentation/HOWTO//NAT-HOWTO.html] for more info, or issue the !openvzlinnat if you use openvz 30 see [http://netfilter.org/documentation/HOWTO//NAT-HOWTO.html] for more info on NAT in linux. 31 31 32 32 NOTE you maybe need to '''save the iptables settings''' so they will be restored when you boot the system. I haven't rebooted in a long while so I don't remember the command to save iptables settings, or if it's automatically saved. 33 == openVPN server on Windows ==33 == openVPN server on Windows XP == 34 34 Here [http://openvpn.net/archive/openvpn-users/2006-09/msg00031.html] you've got a nice howto on how to do real NAT with windows xp. Not the NAT that messes up your LAN settings, but real NAT without touching your IP address setup. 35 35 … … 44 44 As '''I wanted to connect the VPN clients to the corporate network''' I had to '''add both the internet NIC and the corporate NIC as FULL''': 45 45 46 1. Modify Registry Entry :46 1. Modify Registry Entry to allow IP forwarding: 47 47 {{{ 48 48 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters