if SWW_WAF_ABUSEIPDB_KEY is set then use SWW_WAF_ABUSEIPDB_THRESHOLD to pre-ban clients on startup #411

Closed
opened 2026-11-19 08:29:33 +01:00 by sneak · 1 comment
Owner

use the abuseipdb api to fetch the blacklist in advance.

the blacklist should be re-fetched on waf startup and then every SWW_WAF_ABUSEIPDB_BLACKLIST_REFRESH_INTERVAL_MINS (default 60). don't worry about saving it.

curl -G https://api.abuseipdb.com/api/v2/blacklist \
  -d confidenceMinimum=90 \
  -H "Key: YOUR_OWN_API_KEY" \
  -H "Accept: application/json"

default threshold to 90, note in the readme it shouldn't be set below 50-75.

every client in the blacklist response should receive a SWW_WAF_ABUSEIPDB_BAN_DAYS (default: 30) ban.

use the abuseipdb api to fetch the blacklist in advance. the blacklist should be re-fetched on waf startup and then every SWW_WAF_ABUSEIPDB_BLACKLIST_REFRESH_INTERVAL_MINS (default 60). don't worry about saving it. ``` curl -G https://api.abuseipdb.com/api/v2/blacklist \ -d confidenceMinimum=90 \ -H "Key: YOUR_OWN_API_KEY" \ -H "Accept: application/json" ``` default threshold to 90, note in the readme it shouldn't be set below 50-75. every client in the blacklist response should receive a SWW_WAF_ABUSEIPDB_BAN_DAYS (default: 30) ban.
Collaborator

Built in #416 on branch issue-411-abuseipdb-blacklist, which targets next.

  • The blacklist is fetched at the start and every SWW_WAF_ABUSEIPDB_BLACKLIST_REFRESH_INTERVAL_MINS (default 60), using SWW_WAF_ABUSEIPDB_THRESHOLD (default 90, accepts 25 to 100).
  • Each listed client gets a ban of SWW_WAF_ABUSEIPDB_BAN_DAYS (default 30), with the new cause abuseipdb.
  • These bans do not count toward SWW_WAF_MAX_BANS. Each fetch forgets the ones that have ended.
  • A ban an admin lifts stays lifted until its original end.
  • Observe mode makes no ban.

Judgement call: a free AbuseIPDB account gets 5 blacklist fetches a day, so the default 60-minute interval means 19 fetches a day fail with 429, and each is alerted. The PR body notes it.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/416 on branch `issue-411-abuseipdb-blacklist`, which targets `next`. - The blacklist is fetched at the start and every `SWW_WAF_ABUSEIPDB_BLACKLIST_REFRESH_INTERVAL_MINS` (default 60), using `SWW_WAF_ABUSEIPDB_THRESHOLD` (default 90, accepts 25 to 100). - Each listed client gets a ban of `SWW_WAF_ABUSEIPDB_BAN_DAYS` (default 30), with the new cause `abuseipdb`. - These bans do not count toward `SWW_WAF_MAX_BANS`. Each fetch forgets the ones that have ended. - A ban an admin lifts stays lifted until its original end. - Observe mode makes no ban. Judgement call: a free AbuseIPDB account gets 5 blacklist fetches a day, so the default 60-minute interval means 19 fetches a day fail with `429`, and each is alerted. The PR body notes it. Model: opus-5-5
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#411