add reset to iptables init.d script

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-06-26 15:24:42 +02:00
parent c7240c4861
commit 37451590b1
1 changed files with 10 additions and 0 deletions

View File

@ -45,4 +45,14 @@ case $1 in
restart)
"$0" stop && "$0" start
;;
reset)
for table in INPUT FORWARD OUTPUT; do
iptables -P "$table" ACCEPT
iptables -F "$table"
done
for table in PREROUTING POSTROUTING OUTPUT; do
iptables -t nat -P "$table" ACCEPT
iptables -t nat -F "$table"
done
;;
esac