+2
-1
services/fail2ban/default.nix
+2
-1
services/fail2ban/default.nix
···
101
101
[Definition]
102
102
# Report IP to AbuseIPDB, reading API key from Agenix secret file
103
103
# Simple version without <matches> to avoid parameter substitution issues
104
-
actionban = sleep 1; curl --fail 'https://api.abuseipdb.com/api/v2/report' -H 'Accept: application/json' -H 'Key: $(cat /run/agenix/abuseipdb)' --data-urlencode 'ip=<ip>' --data 'categories=<abuseipdb_category>'
104
+
# Uses double quotes to allow shell expansion of $(cat /run/agenix/abuseipdb)
105
+
actionban = sleep 1; curl --fail 'https://api.abuseipdb.com/api/v2/report' -H 'Accept: application/json' -H "Key: $(cat /run/agenix/abuseipdb)" --data-urlencode 'ip=<ip>' --data 'categories=<abuseipdb_category>'
105
106
106
107
actionstart =
107
108
actionstop =