diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-04-04 10:34:02 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-04-04 10:34:02 +0200 |
commit | 5042ac8e5927d0089d3902b1c37e5bcc1565d053 (patch) | |
tree | cd2be3085808c5ac59dd70f9c610c6a40bfe3ffd /package/iptables/files/firewall.init | |
parent | 401dabf66529cfb5ab47b4c78d5e25fd493eef1f (diff) | |
parent | 4d569ed1a3305c7b7abe8fa4273cea3b559cc85a (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Conflicts:
BUGS
package/autoconf/Makefile
Diffstat (limited to 'package/iptables/files/firewall.init')
-rwxr-xr-x | package/iptables/files/firewall.init | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/package/iptables/files/firewall.init b/package/iptables/files/firewall.init new file mode 100755 index 000000000..b3ea698d6 --- /dev/null +++ b/package/iptables/files/firewall.init @@ -0,0 +1,35 @@ +#!/bin/sh +#PKG iptables +#INIT 45 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${firewall:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + . /etc/firewall.conf + ;; +stop) + ### Clear tables + iptables -F + iptables -X + iptables -t nat -F + iptables -t nat -X + iptables -P INPUT ACCEPT + iptables -P FORWARD ACCEPT + iptables -P OUTPUT ACCEPT + iptables -t nat -P PREROUTING ACCEPT + iptables -t nat -P POSTROUTING ACCEPT + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + ;; +esac +exit $? |