#! /bin/sh # /etc/init.d/local-iptables # case "$1" in start) echo 1 > /proc/sys/net/ipv4/ip_forward iptables --flush iptables -A FORWARD -i eth0 -s 172.31.0.0/16 -j ACCEPT iptables -A FORWARD -o eth0 -d 172.31.0.0/16 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE ;; stop) echo 0 > /proc/sys/net/ipv4/ip_forward iptables --flush ;; restart) $0 stop $0 start ;; *) echo "Usage: /etc/init.d/orange-umts {start|stop|restart}" exit 1 ;; esac exit 0