Browse Source

Update 'quietcinsarmy.sh'

Moved chain jump, to fix duplicate jump bug.
deadtom 1 week ago
parent
commit
524db63639
1 changed files with 2 additions and 3 deletions
  1. 2 3
      quietcinsarmy.sh

+ 2 - 3
quietcinsarmy.sh

@@ -24,6 +24,8 @@ if $FIREWALL -L $CHAIN_NAME -n &> /dev/null; then
 else
     # echo "Creating chain $CHAIN_NAME."
     $FIREWALL -N $CHAIN_NAME
+	# Jump to the our chain from the FORWARD CHAIN
+	$FIREWALL -A FORWARD -j $CHAIN_NAME
 fi
 
 # echo "Processing the bad guys list..."
@@ -38,9 +40,6 @@ while IFS= read -r ip; do
     fi
 done < "$BADGUYS_FILE"
 
-# Jump to the our chain from the FORWARD CHAIN
-$FIREWALL -A FORWARD -j $CHAIN_NAME
-
 # Delete the bad guys file
 rm $BADGUYS_FILE