2006-10-04 20:57:49 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2011-11-12 01:30:23 +00:00
|
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
2006-08-07 12:39:12 +00:00
|
|
|
|
2006-10-15 21:03:30 +00:00
|
|
|
START=60
|
2011-11-12 01:30:23 +00:00
|
|
|
|
2006-08-07 12:39:12 +00:00
|
|
|
IPT=/usr/sbin/iptables
|
|
|
|
|
2006-10-04 20:57:49 +00:00
|
|
|
set_rules() {
|
2006-10-15 21:03:30 +00:00
|
|
|
include /lib/network
|
|
|
|
scan_interfaces
|
|
|
|
config_get WAN wan ifname
|
|
|
|
|
2006-10-04 20:57:49 +00:00
|
|
|
[ -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() {
|
2011-11-12 01:30:23 +00:00
|
|
|
service_start /usr/sbin/reaim && set_rules -A
|
2006-10-04 20:57:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-11-12 01:30:23 +00:00
|
|
|
service_stop /usr/sbin/reaim && set_rules -D
|
2006-10-04 20:57:49 +00:00
|
|
|
}
|