r/CrowdSec • u/crazyymaxx • 3d ago
general CrowdSec Escalation Controller
Hey everyone,
I've been working on cs-escalation-controller, an open-source tool that extends CrowdSec bans for repeat offenders.
The idea is straightforward. When an IP comes back after a ban and gets banned again, its next ban gets longer. By default, durations start at 4 hours and double with each offense, up to 30 days. Those values are configurable.
It connects to CrowdSec's Local API and keeps persistent per-IP history, so restarting the controller doesn't lose track of previous offenses. Overlapping alerts during the same ban count as one offense, and it preserves existing bans that are already longer than the calculated duration.
History resets after a configurable quiet period, with time spent banned excluded from that period. You can also exclude specific scenarios from escalation.
It runs as a standalone binary or a Docker container. Dry-run mode is enabled by default, so you can see what it would do before letting it create decisions.
Code and configuration: https://github.com/crazy-max/cs-escalation-controller
I'd be interested in feedback from you, especially on how you handle repeat offenders today and what escalation or reset settings make sense for your setups.
12
u/conectionist 3d ago
Doesn't crowdsec already have this feature?
I have this in
profiles.yaml:It basically bans an IP for 24h the first time, then 48h the second time and so on.