Hi! I'm new with Linux. I have a linux gateway with 2 NIC.
In order to share the internet connection of eth0 to eth1 I always run this script below mannually. Please help me were would I put this to automically run everytime I restart.
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
Thank you and more power.
In order to share the internet connection of eth0 to eth1 I always run this script below mannually. Please help me were would I put this to automically run everytime I restart.
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
Thank you and more power.