From dbe080c6b5be70c92f82b69bb8d2ed3f20620928 Mon Sep 17 00:00:00 2001 From: bbruns Date: Sun, 26 Sep 2010 21:30:45 +0000 Subject: [PATCH] Fixes for multiport --- bin/firewall-sosdg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/firewall-sosdg b/bin/firewall-sosdg index a613e77..c356b7f 100755 --- a/bin/firewall-sosdg +++ b/bin/firewall-sosdg @@ -262,7 +262,7 @@ fi if [ "$TCPPORTS" ] || [ "$UDPPORTS" ]; then display_c YELLOW "Adding allowed port: " N if [ "$TCPPORTS" ]; then - if [ $IPTABLES_MULTIPORT == "yes" ]; then + if [ $IPTABLES_MULTIPORT == "yes" ] && [ $NF_MULTIPORT_MAX_PORTS ]; then TCPPORTS=($TCPPORTS) PORTS_COUNT=${#TCPPORTS[@]} PORTS_COUNT_CURR=0 @@ -273,7 +273,7 @@ if [ "$TCPPORTS" ] || [ "$UDPPORTS" ]; then fi done echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}" - ${IPTABLES} -A INPUT -p tcp -m multiport --dports ${PORTS#,} -j ACCEPT + $IPTABLES -A INPUT -p tcp -m multiport --dports ${PORTS#,} -j ACCEPT unset PORTS PORTS_COUNT_CURR=$y done