Created
April 5, 2015 17:28
-
-
Save ibejohn818/507fade3aa2b7f4dc218 to your computer and use it in GitHub Desktop.
Linux NAT'ing Steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On NAT Host | |
1) enable IPv4 fowarding | |
/etc/sysctl.conf | |
2) Forward eth0 -> eth1 and vise-versa | |
-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A FORWARD -i eth1 -o eth0 -j ACCEPT | |
3) modify nat table to masquerade ( Rewrite ip packets ) | |
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
On private nodes, set DNS to be public facing such as Google Public DNS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment