瀏覽代碼

Update 'quietcinsarmy.sh'

Added return rule for the chain
deadtom 1 周之前
父節點
當前提交
da3978fdff
共有 1 個文件被更改,包括 17 次插入0 次删除
  1. 17 0
      quietcinsarmy.sh

+ 17 - 0
quietcinsarmy.sh

@@ -47,3 +47,20 @@ rm $BADGUYS_FILE
 
 # echo "Bad guys list has been processed, and deleted."
 
+# echo "Checking for return rule at the end of our chain."
+
+# Check if the rule already exists
+
+RETURNRULE="-A $CHAIN_NAME -p tcp -j RETURN"
+
+if $FIREWALL -S $CHAIN_NAME | grep -q "$RETURNRULE"; then
+    # echo "Rule already exists: $RETURNRULE"
+    :
+else
+    # Add the rule if it doesn't exist
+    $FIREWALL $RETURNRULE
+    # echo "Rule added: $RETURNRULE"
+fi
+
+echo "Done.
+