route from one nwtwork(ethernet) card for another (2 ethernet cards)
#/bin/sh
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html
Comments
Post a Comment