luci-app-vlmcsd: do not expose port to WAN
This commit is contained in:
parent
a4913d5f9a
commit
2fee657db2
@ -7,15 +7,5 @@ uci -q batch <<-EOF >/dev/null
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
uci delete firewall.kms
|
||||
uci add firewall rule
|
||||
uci rename firewall.@rule[-1]="kms"
|
||||
uci set firewall.@rule[-1].name="kms"
|
||||
uci set firewall.@rule[-1].target="ACCEPT"
|
||||
uci set firewall.@rule[-1].src="wan"
|
||||
uci set firewall.@rule[-1].proto="tcp"
|
||||
uci set firewall.@rule[-1].dest_port="1688"
|
||||
uci commit firewall
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
||||
@ -6,10 +6,6 @@ START=90
|
||||
start(){
|
||||
if [ ! -f "/tmp/vlmcsd.pid" ]; then
|
||||
/usr/bin/vlmcsd -i /etc/vlmcsd.ini -p /tmp/vlmcsd.pid -L 0.0.0.0:1688
|
||||
iptables -D input_rule -p tcp --dport 1688 -j ACCEPT
|
||||
iptables -A input_rule -p tcp --dport 1688 -j ACCEPT
|
||||
sed -i '/## luci-app-vlmcsd/d' /etc/firewall.user
|
||||
echo "iptables -A input_rule -p tcp --dport 1688 -j ACCEPT ## luci-app-vlmcsd" >> /etc/firewall.user
|
||||
echo "KMS Server has started."
|
||||
else
|
||||
echo "KMS Server has already started."
|
||||
@ -23,8 +19,6 @@ stop(){
|
||||
pid=`cat /tmp/vlmcsd.pid`
|
||||
kill $pid
|
||||
rm -f /tmp/vlmcsd.pid
|
||||
iptables -D input_rule -p tcp --dport 1688 -j ACCEPT
|
||||
sed -i '/## luci-app-vlmcsd/d' /etc/firewall.user
|
||||
echo "KMS Server has stopped."
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user