5307723017
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28966 3c298f89-4303-0410-b956-a3cf2f4a3e73
27 lines
566 B
Bash
27 lines
566 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
START=60
|
|
|
|
IPT=/usr/sbin/iptables
|
|
|
|
set_rules() {
|
|
include /lib/network
|
|
scan_interfaces
|
|
config_get WAN wan ifname
|
|
|
|
[ -z "$WAN" ] && exit
|
|
$IPT $1 input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
|
|
$IPT $1 input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
|
|
$IPT $1 input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT
|
|
$IPT $1 input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT
|
|
}
|
|
|
|
start() {
|
|
service_start /usr/sbin/reaim && set_rules -A
|
|
}
|
|
|
|
stop() {
|
|
service_stop /usr/sbin/reaim && set_rules -D
|
|
}
|