moth/doc/openwrt/etc/init.d/iptables

27 lines
487 B
Plaintext
Raw Normal View History

2010-10-21 16:06:24 -06:00
#! /bin/sh /etc/rc.common
START=45
STOP=89
start () {
stop
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
2010-10-22 11:04:04 -06:00
iptables -A INPUT -p udp --dport 53 -j ACCEPT
2010-10-21 16:06:24 -06:00
iptables -A INPUT -p udp --dport 67 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -s 10.0.0.0/16 -j ACCEPT
iptables -A INPUT -j REJECT
}
stop () {
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
}