sneak ruled to remove it. Gone: the heuristic crowdsec, the ban cause crowdsec and its earlier_bans count, the tag crowdsec, the settings SWW_WAF_CROWDSEC_LAPI_URL and SWW_WAF_CROWDSEC_LAPI_KEY, the decision list fetch and parse in internal/reputation, their tests, and every mention in the README, SPEC.md and docs/. EVALUATION.md keeps its comparison of tools. The ban ledger's internal ban function loses its expires parameter, which only CrowdSec bans used. Model: opus-5-5
This commit is contained in:
1 parent
50c50bfcae
commit
478c3affad
27 files changed
+125
-1851
No files matched your search
@@ -176,7 +176,6 @@ field gives that name. `refusal_limit` and `byte_limits` give theirs in
|
||||
8. The reputation sources (see "Reputation"), in this order:
|
||||
- A client on a fetched blocklist gets `SWW_WAF_BLOCKLIST_ACTION`
|
||||
(`blocklists`).
|
||||
- A client on the CrowdSec decision list is banned (`crowdsec`).
|
||||
- A client listed by a DNS blocklist gets `SWW_WAF_DNSBL_ABUSEIPDB_ACTION`
|
||||
(`dnsbl`).
|
||||
- A client scored at least `SWW_WAF_ABUSEIPDB_MIN_SCORE` by AbuseIPDB gets
|
||||
@@ -301,14 +300,6 @@ without a ban, because the Core Rule Set has false positives. A `block` rule
|
||||
does the same. Those refusals count toward the refusal limit, so a client that
|
||||
keeps setting them off is banned for a broken limit.
|
||||
|
||||
A client on the CrowdSec decision list is banned until the decision ends, with
|
||||
the cause `crowdsec`. Only a client that sends a request is banned, so a long
|
||||
list does not fill `bans.json`. Such a ban is never made permanent. It does not
|
||||
make the netblock's next ban for a broken limit longer. A ban lifted while the
|
||||
decision is in force is made again at the client's next request. To lift it for
|
||||
good, delete the decision in CrowdSec, then lift the ban once the list has been
|
||||
fetched again.
|
||||
|
||||
These refuse each request they cover, record nothing in `bans.json`, and count
|
||||
no offence:
|
||||
|
||||
@@ -338,10 +329,10 @@ toward `SWW_WAF_MAX_BANS`, so such bans can never fill the table.
|
||||
|
||||
A request refused under a ban that runs out is logged with the action
|
||||
`temporarily_banned`. Under a permanent ban the action is `permanently_banned`.
|
||||
A request refused for a clear sign of attack or a CrowdSec decision takes the
|
||||
action for the ban it made. A request that makes a ban permanent is logged as
|
||||
`permanently_banned`. A request over a rate limit is logged as
|
||||
`client_is_rate_limited`, whichever ban it makes.
|
||||
A request refused for a clear sign of attack takes the action for the ban it
|
||||
made. A request that makes a ban permanent is logged as `permanently_banned`. A
|
||||
request over a rate limit is logged as `client_is_rate_limited`, whichever ban
|
||||
it makes.
|
||||
|
||||
## Settings
|
||||
|
||||
@@ -575,9 +566,9 @@ Each tag and where it comes from:
|
||||
- One tag per list of `SWW_WAF_TAG_LISTS` that holds the client (`tag_lists`),
|
||||
the tag being the list's name, such as `torexit` or `vpn=mullvad`. These lists
|
||||
are fetched and kept like a blocklist. `waf` ships none of its own.
|
||||
- `crowdsec`, `dnsbl=<zone>` and `abuseipdb`, when that reputation source lists
|
||||
the client, whatever the source's action. A zone with a key is named with the
|
||||
key masked, as the `reputation` field gives it.
|
||||
- `dnsbl=<zone>` and `abuseipdb`, when that reputation source lists the client,
|
||||
whatever the source's action. A zone with a key is named with the key masked,
|
||||
as the `reputation` field gives it.
|
||||
- `exploitsignature`, when a rule file or the Core Rule Set matched the request.
|
||||
For the Core Rule Set a match is a score at or over
|
||||
`SWW_WAF_CORE_RULE_SET_SCORE_THRESHOLD`.
|
||||
@@ -1960,12 +1951,11 @@ to the surrounding netblock. The four ban lengths are under "Bans".
|
||||
### Reputation
|
||||
|
||||
No source is on by default. A source acts on a list kept elsewhere; the defaults
|
||||
judge a client only by what it does here. AbuseIPDB and CrowdSec also need an
|
||||
account or an engine of the operator's own. The list best suited to be on by
|
||||
default, Spamhaus DROP, has terms, below, that forbid frequent fetching, and
|
||||
Spamhaus may block an address that breaks them. Each `waf` fetches its own copy,
|
||||
so several of them on one host, sharing one address, would often fetch too close
|
||||
together.
|
||||
judge a client only by what it does here. AbuseIPDB also needs an account of the
|
||||
operator's own. The list best suited to be on by default, Spamhaus DROP, has
|
||||
terms, below, that forbid frequent fetching, and Spamhaus may block an address
|
||||
that breaks them. Each `waf` fetches its own copy, so several of them on one
|
||||
host, sharing one address, would often fetch too close together.
|
||||
|
||||
- Blocklists (`SWW_WAF_BLOCKLIST_URLS`) are text files of addresses and
|
||||
netblocks, one to a line, as the Spamhaus DROP list is written. Anything after
|
||||
@@ -1998,18 +1988,6 @@ together.
|
||||
percentage of every request and byte limit, and suits a list of addresses
|
||||
shared with ordinary visitors, such as Tor exits. `log` only notes the hit in
|
||||
the log line and raises an alert.
|
||||
- A CrowdSec engine on the host (`SWW_WAF_CROWDSEC_LAPI_URL`) has its decision
|
||||
list fetched every minute, with `SWW_WAF_CROWDSEC_LAPI_KEY` in the `X-Api-Key`
|
||||
header. The list is kept like a fetched blocklist, and a client on it is
|
||||
banned (see "Bans"). Only decisions of the type `ban` on an address or a
|
||||
netblock are used; any other, such as a captcha or a country, is left out. A
|
||||
decision lasts for the `duration` it had left when the engine answered. This
|
||||
is how a fleet-wide blocklist can arrive without `waf` depending on CrowdSec.
|
||||
A fetch fails when:
|
||||
- the engine answers other than `200`, a redirect included;
|
||||
- the fetch does not finish within a minute;
|
||||
- the answer is longer than 16 MiB;
|
||||
- the answer is not a list of decisions.
|
||||
- Each DNS blocklist (`SWW_WAF_DNSBL_ZONES`) is asked about a client's own
|
||||
address in the background, the first time the client is seen. No request waits
|
||||
for the answer. The name asked about is the one RFC 5782 gives: the numbers of
|
||||
@@ -2437,14 +2415,13 @@ client without an answer by then counts as unknown. No question waits on these,
|
||||
which run in the background:
|
||||
|
||||
- the DNS blocklists and AbuseIPDB;
|
||||
- fetching the blocklists, the tag lists, the CrowdSec decision list and the
|
||||
file `SWW_WAF_ASN_LIMIT_PERCENT_URL` names.
|
||||
- fetching the blocklists, the tag lists and the file
|
||||
`SWW_WAF_ASN_LIMIT_PERCENT_URL` names.
|
||||
|
||||
In `enforce` mode, a question does not wait for GeoJS when it is a request:
|
||||
|
||||
- from a client on a fetched blocklist, while `SWW_WAF_BLOCKLIST_ACTION` is
|
||||
`deny`;
|
||||
- from a client on the CrowdSec decision list;
|
||||
- that would take its client over a rate limit at 100% of it, since a percentage
|
||||
can only lower a limit.
|
||||
|
||||
|
||||
Reference in new issue
Block a user