OS/Linux

[network] nat

아스피린2 2010. 3. 11. 19:02

* how to nat, masquerade with iptables
wan: eth0, lan: eth1
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward


cf) flush iptables

iptables --flush

iptables --table nat --flush

iptables --delete-chain


iptables --table nat --delete-chain


* iptables concept


ref: http://www.howtoforge.com/nat_iptables

'OS > Linux' 카테고리의 다른 글

[CentOS] basic info  (0) 2010.03.26
[CentOS] snmp service  (0) 2010.03.26
[cmd] compress & uncompress  (0) 2010.03.03
[manage] webmin  (0) 2010.03.03
redhat series NFS services  (0) 2010.02.10