luci-app-vlmcsd: do not expose port to WAN

This commit is contained in:
LGA1150 2020-01-06 19:44:14 +08:00 committed by CN_SZTL
parent a4913d5f9a
commit 2fee657db2
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 0 additions and 16 deletions

View File

@ -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

View File

@ -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
}