diff --git a/config/action.d/abuseipdb.conf b/config/action.d/abuseipdb.conf index d0d4a99b..0dec05ba 100644 --- a/config/action.d/abuseipdb.conf +++ b/config/action.d/abuseipdb.conf @@ -75,17 +75,25 @@ actioncheck = # # By default, this posts directly to AbuseIPDB's API, unfortunately # this results in a lot of backslashes/escapes appearing in the -# reports. This also may include info like your hostname. +# reports. This also may include info like your hostname (please refer to +# ). # If you have your own web server with PHP available, you can # use my (Shaun's) helper PHP script by commenting out the first #actionban # line below, uncommenting the second one, and pointing the URL at -# wherever you install the helper script. For the PHP helper script, see -# -# # Tags: See jail.conf(5) man page # Values: CMD # -actionban = lgm=$(printf '%%.1000s\n...' ""); 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=$(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=" # Option: actionunban # Notes.: command executed when unbanning an IP. Take care that the @@ -102,3 +110,10 @@ actionunban = # Register for abuseipdb [https://www.abuseipdb.com], get api key and set below. # You will need to set the category in the action call. abuseipdb_apikey = + +# Add the ability to modify the comment on the fly +# and remove certain keywords from the report, such as your hostname, IP, etc. +# +# Format: keyword1|keyword2 +# Case-insensitive +keywords_to_remove =