waf: ban the clients on AbuseIPDB's blacklist (closes #411)
check / check (push) Waiting to run
check / check (push) Waiting to run
While SWW_WAF_ABUSEIPDB_KEY is set, waf fetches AbuseIPDB's blacklist at the start and every SWW_WAF_ABUSEIPDB_BLACKLIST_REFRESH_INTERVAL_MINS (60), cut at SWW_WAF_ABUSEIPDB_THRESHOLD (90, from 25 to 100). Each listed client's netblock gets a ban of SWW_WAF_ABUSEIPDB_BAN_DAYS (30) with the new cause abuseipdb. The blacklist itself is not kept. These bans do not count toward SWW_WAF_MAX_BANS, so a 10,000-address blacklist cannot push out the bans for limits and attacks. An ended abuseipdb ban is forgotten at each fetch and each read of bans.json. A netblock with an active ban is left alone, and so is one whose abuseipdb ban an admin lifted, until that ban would have ended. Observe mode makes no ban. Model: opus-5-5
This commit is contained in:
1 parent
9f42460f70
commit
dfffeb73ec
22 files changed
+1304
-205
No files matched your search
+9
-2
@@ -42,8 +42,8 @@ chooses between the two (see "The image's command" below).
|
||||
client's group, from 32 to 128.
|
||||
- `SWW_WAF_MAX_TRACKED_CLIENTS` (default `20000`): the most clients kept, a
|
||||
whole number above zero.
|
||||
- `SWW_WAF_MAX_BANS` (default `5000`): how many of its own bans `waf` keeps, a
|
||||
whole number above zero.
|
||||
- `SWW_WAF_MAX_BANS` (default `5000`): the most bans `waf` keeps for broken
|
||||
limits and attacks, a whole number above zero.
|
||||
|
||||
## Tokens
|
||||
|
||||
@@ -338,6 +338,13 @@ tag that no request can get stops the start. A request can get only these:
|
||||
or AbuseIPDB's score is used. A duration.
|
||||
- `SWW_WAF_DNSBL_ABUSEIPDB_TIMEOUT_MS` (default `2000`): how long a query to a
|
||||
zone or a check with AbuseIPDB may take. A time in milliseconds.
|
||||
- `SWW_WAF_ABUSEIPDB_THRESHOLD` (default `90`): the least abuse confidence score
|
||||
of the clients on AbuseIPDB's blacklist, a whole number from 25 to 100. It
|
||||
should not be set below 50 to 75, since lower scores list ordinary visitors.
|
||||
- `SWW_WAF_ABUSEIPDB_BLACKLIST_REFRESH_INTERVAL_MINS` (default `60`): how often
|
||||
the blacklist is fetched again, in minutes. A whole number above zero.
|
||||
- `SWW_WAF_ABUSEIPDB_BAN_DAYS` (default `30`): how long the ban of a client on
|
||||
the blacklist lasts, in days. A whole number above zero.
|
||||
|
||||
## Alerting
|
||||
|
||||
|
||||
Reference in new issue
Block a user