source: freewrt/package/iptables/files/firewall.init@ e87ee18

freewrt_1_0 freewrt_2_0
Last change on this file since e87ee18 was 5d9f1ed, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

more init script fixes

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1009 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 491 bytes
Line 
1#!/bin/sh
2
3. /etc/rc.conf
4
5case $1 in
6autostart)
7 test x"${firewall:-NO}" = x"NO" && exit 0
8 exec $0 start
9 ;;
10start)
11 . /etc/firewall.conf
12 ;;
13stop)
14 ### Clear tables
15 iptables -F
16 iptables -X
17 iptables -t nat -F
18 iptables -t nat -X
19 iptables -P INPUT ACCEPT
20 iptables -P FORWARD ACCEPT
21 iptables -P OUTPUT ACCEPT
22 iptables -t nat -P PREROUTING ACCEPT
23 iptables -t nat -P POSTROUTING ACCEPT
24 ;;
25restart)
26 $0 stop
27 $0 start
28 ;;
29*)
30 echo "Usage: $0 {start | stop | restart}"
31 ;;
32esac
33exit $?
Note: See TracBrowser for help on using the repository browser.