route -f
route -p add 192.168.0.0 mask 255.255.0.0 192.168.1.1
route add 192.168.1.1 mask 255.255.255.255 192.168.2.1
route -p add 0.0.0.0 mask 0.0.0.0 192.168.2.1
net use p: \\192.1681.1\xxx /USER:xxx\xx.xxx
net use \\192.168.1.1 /USER:xxx
net use p: /delete
subst s: /d
Showing posts with label Router. Show all posts
Showing posts with label Router. 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
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
Subscribe to:
Posts (Atom)