From 3f721eb019c91a42dc975845b8aa5a89cfc60159 Mon Sep 17 00:00:00 2001 From: Georgiy Sitnikov Date: Wed, 22 Oct 2025 09:32:47 +0200 Subject: [PATCH] Refactor actionban command in abuseipdb.conf Move limit logic to the end, so that it will apply after keywords will be removed. --- config/action.d/abuseipdb.conf | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/config/action.d/abuseipdb.conf b/config/action.d/abuseipdb.conf index 0dec05ba..aa70496d 100644 --- a/config/action.d/abuseipdb.conf +++ b/config/action.d/abuseipdb.conf @@ -83,17 +83,18 @@ actioncheck = # Tags: See jail.conf(5) man page # Values: CMD # -actionban = lgm=$( \ - msg=$(printf '%%.1000s\n...' ""); \ - [ -n "" ] && \ - msg=$(echo "$msg" | sed -E "s/\b()\b/REDACTED/gI"); \ - echo "$msg" ); \ - curl -sSf "https://api.abuseipdb.com/api/v2/report" \ - -H "Accept: application/json" \ - -H "Key: " \ - --data-urlencode "comment=$lgm" \ - --data-urlencode "ip=" \ - --data "categories=" +actionban = lgm=$( + msg="" ;\ + [ -n "" ] && \ + msg=$(echo "$msg" | sed -E "s/\b()\b/REDACTED/gI") ;\ + msg=$(printf '%%.1000s\n...' "$msg") ;\ + echo "$msg" ) ;\ + curl -sSf "https://api.abuseipdb.com/api/v2/report" \ + -H "Accept: application/json" \ + -H "Key: " \ + --data-urlencode "comment=$lgm" \ + --data-urlencode "ip=" \ + --data "categories=" # Option: actionunban # Notes.: command executed when unbanning an IP. Take care that the