luci app vlmcsd: add wan kms firewall rules

This commit is contained in:
coolsnowwolf 2018-12-22 23:37:19 +08:00
parent a950b9fcba
commit 9394a3f4bf
2 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI page for KMS
LUCI_DEPENDS:=+vlmcsd
PKG_VERSION:=1.0
PKG_RELEASE:=2
PKG_RELEASE:=3
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -7,5 +7,15 @@ 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