Fixes for multiport
parent
dbe080c6b5
commit
41ebd30e99
|
@ -263,13 +263,13 @@ if [ "$TCPPORTS" ] || [ "$UDPPORTS" ]; then
|
|||
display_c YELLOW "Adding allowed port: " N
|
||||
if [ "$TCPPORTS" ]; then
|
||||
if [ $IPTABLES_MULTIPORT == "yes" ] && [ $NF_MULTIPORT_MAX_PORTS ]; then
|
||||
TCPPORTS=($TCPPORTS)
|
||||
TCPPORTS_ARRAY=($TCPPORTS)
|
||||
PORTS_COUNT=${#TCPPORTS[@]}
|
||||
PORTS_COUNT_CURR=0
|
||||
while [ $PORTS_COUNT_CURR -lt $PORTS_COUNT ]; do
|
||||
for ((y=$PORTS_COUNT_CURR; y <=(($PORTS_COUNT_CURR+((MULTI_MAX_PORTS-1)))); y++)); do
|
||||
if [ ${TCPPORTS[$y]} ]; then
|
||||
PORTS="$PORTS,${TCPPORTS[$y]}"
|
||||
if [ ${TCPPORTS_ARRAY[$y]} ]; then
|
||||
PORTS="${PORTS},${TCPPORTS_ARRAY[$y]}"
|
||||
fi
|
||||
done
|
||||
echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}"
|
||||
|
@ -565,7 +565,7 @@ if [ $IPV6 ]; then
|
|||
if [ "$IPV6TCP" ] || [ "$IPV6UDP" ]; then
|
||||
display_c YELLOW "Adding allowed IPv6 port: " N
|
||||
if [ "$IPV6TCP" ]; then
|
||||
if [ $IPTABLES_MULTIPORT == "yes" ]; then
|
||||
if [ $IPTABLES_MULTIPORT == "yes" ] && [ $NF_MULTIPORT_MAX_PORTS ]; then
|
||||
IPV6TCP=($IPV6TCP)
|
||||
PORTS_COUNT=${#IPV6TCP[@]}
|
||||
PORTS_COUNT_CURR=0
|
||||
|
|
Loading…
Reference in New Issue