❄️ Dotfiles for our NixOS system configuration.

chore(services:fail2ban): test

Chloe add87cdb 64851ff3

Changed files
+2 -1
services
fail2ban
+2 -1
services/fail2ban/default.nix
···
# Report IP to AbuseIPDB, reading API key from Agenix secret file
# Based on official fail2ban abuseipdb.conf but with API key from Agenix
# Note: Must be on single line (no backslash continuation) for INI parser
-
actionban = curl --fail 'https://api.abuseipdb.com/api/v2/report' -H 'Accept: application/json' -H 'Key: $(cat /run/agenix/abuseipdb)' --data-urlencode 'ip=<ip>' --data-urlencode 'comment=<matches>' --data 'categories=<abuseipdb_category>'
actionstart =
actionstop =
···
# Report IP to AbuseIPDB, reading API key from Agenix secret file
# Based on official fail2ban abuseipdb.conf but with API key from Agenix
# Note: Must be on single line (no backslash continuation) for INI parser
+
# Rate limiting: sleep briefly before reporting to avoid 429 Too Many Requests
+
actionban = sleep 5; curl --fail 'https://api.abuseipdb.com/api/v2/report' -H 'Accept: application/json' -H 'Key: $(cat /run/agenix/abuseipdb)' --data-urlencode 'ip=<ip>' --data-urlencode 'comment=<matches>' --data 'categories=<abuseipdb_category>'
actionstart =
actionstop =