Default the netblock and AS number anomaly thresholds (closes #410)
check / check (push) Failing after 1m37s
check / check (push) Failing after 1m37s
The alert-only thresholds per netblock and per AS number now have defaults that alert on obvious abuse alone: per netblock 1200 and 15000 requests a minute and an hour, 5G and 50G a minute and an hour; per AS number five times those. The AS number ones default to off while SWW_WAF_LOOKUP_SOURCE is off. The other scopes stay off. The README says to tune them to the site's traffic. Model: opus-5-5
This commit is contained in:
1 parent
8219664ad1
commit
b8abb87738
7 files changed
+149
-32
No files matched your search
+19
-2
@@ -378,8 +378,9 @@ Crossing a threshold sends one `anomaly` alert to the destinations under
|
||||
|
||||
Each scope has four thresholds: the most requests and the most body bytes
|
||||
counted in a minute and in an hour. The bytes are those `SWW_WAF_BYTES_COUNTED`
|
||||
names. Requests are counts, bytes are sizes. Each is `off` by default. The four
|
||||
thresholds per client are:
|
||||
names. Requests are counts, bytes are sizes. Each is `off` by default, except
|
||||
those per netblock and per AS number listed below. The four thresholds per
|
||||
client are:
|
||||
|
||||
- `SWW_WAF_ANOMALY_CLIENT_REQUESTS_PER_MINUTE`;
|
||||
- `SWW_WAF_ANOMALY_CLIENT_REQUESTS_PER_HOUR`;
|
||||
@@ -403,6 +404,22 @@ as `REQUESTS_PER_MINUTE`:
|
||||
`office=203.0.113.0/24,scraper-x=198.51.100.0/22`. An item without `=` or a
|
||||
name, or with a bad netblock, is refused. So is a name used twice.
|
||||
|
||||
The thresholds per netblock and per AS number have defaults set high enough to
|
||||
alert only on obvious abuse:
|
||||
|
||||
- per netblock:
|
||||
- `REQUESTS_PER_MINUTE` `1200` and `REQUESTS_PER_HOUR` `15000`, ten clients
|
||||
at the default rate limits;
|
||||
- `BYTES_PER_HOUR` `50G`, one client at the default byte limit per hour;
|
||||
- `BYTES_PER_MINUTE` `5G`, a tenth of that.
|
||||
- per AS number, five times those: `6000`, `75000`, `25G` and `250G`.
|
||||
|
||||
While `SWW_WAF_LOOKUP_SOURCE` is `off`, no request has an AS number, so the
|
||||
thresholds per AS number are `off` by default. Setting one then stops the start.
|
||||
|
||||
These defaults are a starting point. Tune them to your own site's traffic, which
|
||||
the metrics show.
|
||||
|
||||
## Settings given as files
|
||||
|
||||
To give a token as a file, as "Tokens" under "Deployment" in
|
||||
|
||||
Reference in new issue
Block a user