Showing posts with label Gateway. Show all posts
Showing posts with label Gateway. Show all posts

2014-03-13

Tiny Core Linux Router

                st2 iptables

                sudo ifconfig ${IF2} $GWIP netmask $GWMASK

                echo 'echo "1" > /proc/sys/net/ipv4/ip_forward' > /opt/tcz/ipf
                chmod a+x /opt/tcz/ipf
                sudo /opt/tcz/ipf

                sudo modprobe ip_nat_ftp
                sudo modprobe ip_conntrack
                sudo modprobe ip_conntrack_ftp
                sudo modprobe ip_conntrack_irc

                sudo iptables -t nat -F
                sudo iptables -t nat -A POSTROUTING -o $IF1 -s "$GWSRC" -j MASQUERADE



/sbin/iptables-save -t nat > /home/mrtg/iptable.txt 2>&1