2006-10-04 20:57:49 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-05-28 15:42:41 +00:00
|
|
|
# Copyright (C) 2006-2012 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() {
|
2012-05-28 15:42:41 +00:00
|
|
|
. /lib/functions/network.sh
|
2006-10-15 21:03:30 +00:00
|
|
|
|
2012-05-28 15:42:41 +00:00
|
|
|
local device
|
|
|
|
network_get_device device wan && {
|
|
|
|
$IPT $1 input_rule -i $device -p tcp --dport 1863:1864 -j ACCEPT
|
|
|
|
$IPT $1 input_rule -i $device -p tcp --dport 4443 -j ACCEPT
|
|
|
|
$IPT $1 input_rule -i $device -p tcp --dport 5566 -j ACCEPT
|
|
|
|
$IPT $1 input_rule -i $device -p tcp --dport 40000:40099 -j ACCEPT
|
|
|
|
}
|
2006-10-04 20:57:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|