Browse Source

Hopefully fix for error

master
Brielle Bruns 6 months ago
parent
commit
3e7c254037
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      lib/iptables.inc

+ 4
- 4
lib/iptables.inc View File

@@ -355,8 +355,8 @@ function enable_filtering {
dstmultiport="no"
srcmultiport="no"
[[ ${dstport} =~ (-|:|,) ]] && dstmultiport="yes"
[[ ${srcport} =~ (-|:|,) ]] && srcmultiport="yes"
([[ ${dstport} != "-" ]] && [[ ${dstport} =~ (-|:|,) ]]) && dstmultiport="yes"
([[ ${srcport} != "-" ]] && [[ ${srcport} =~ (-|:|,) ]]) && srcmultiport="yes"
([[ ${dstport} != "-" ]] && [[ ${dstmultiport} != "yes" ]]) && dstport="--dport ${dstport}"
([[ ${srcport} != "-" ]] && [[ ${srcmultiport} != "yes" ]]) && srcport="--dport ${srcport}"
([[ ${dstport} != "-" ]] && [[ ${dstmultiport} == "yes" ]]) && dstport="-m multiport --dports ${dstport}"
@@ -427,8 +427,8 @@ function enable_forwarding {
[[ ${syn} == "notsyn" ]] && syn="! --syn"
dstmultiport="no"
srcmultiport="no"
[[ ${dstport} =~ (-|:|,) ]] && dstmultiport="yes"
[[ ${srcport} =~ (-|:|,) ]] && srcmultiport="yes"
([[ ${dstport} != "-" ]] && [[ ${dstport} =~ (-|:|,) ]]) && dstmultiport="yes"
([[ ${srcport} != "-" ]] && [[ ${srcport} =~ (-|:|,) ]]) && srcmultiport="yes"
([[ ${dstport} != "-" ]] && [[ ${dstmultiport} != "yes" ]]) && dstport="--dport ${dstport}"
([[ ${srcport} != "-" ]] && [[ ${srcmultiport} != "yes" ]]) && srcport="--sport ${srcport}"
([[ ${dstport} != "-" ]] && [[ ${dstmultiport} == "yes" ]]) && dstport="-m multiport --dports ${dstport}"


Loading…
Cancel
Save