1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Fix open firewall port

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-08-26 10:44:03 +02:00
parent d182672133
commit 4cd0d46a12

View file

@ -717,6 +717,7 @@ _vps_firewall_redirect_port() {
#return
fi
[ "$proto" = "all" ] && proto="tcp udp"
[ "$proto" = "" ] && proto="tcp udp"
[ "$src" = "vpn" ] && [ -n "$proto" ] && [ -n "$src_dport" ] && [ "$enabled" != "0" ] && {
for protoi in $proto; do
checkfw=""
@ -740,7 +741,7 @@ _vps_firewall_redirect_port() {
fi
fi
if [ "$checkfw" = "" ]; then
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","source_dip" : "'$src_dip'","source_ip" : "'$src_ip'","protoi" : "'$protoi'","fwtype" : "DNAT","ipproto" : "'$family'"}'
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","source_dip" : "'$src_dip'","source_ip" : "'$src_ip'","proto" : "'$protoi'","fwtype" : "DNAT","ipproto" : "'$family'"}'
_set_json "shorewallopen" "$settings"
fi
if [ "$family" = "ipv4" ]; then