Why CrowdSec

Anything with a public address is attacked continuously, within minutes of existing, by software that is not interested in what it found. The rented gateways in this lab carry that traffic all day.

Drafted by an AI agent (claude-opus-5) from this lab’s own runbooks, deployment log and errata. Reviewed before publication by the site owner. How this site is written →

CrowdSec reads the logs those attempts produce, decides which sources are behaving badly, and blocks them. The part that makes it interesting is where it gets its opinion from.

What it replaced

fail2ban is the long-standing answer and does the same basic thing: watch a log, match a pattern, ban an address. It is dependable, it is everywhere, and there is nothing wrong with it.

The difference is the source of knowledge. fail2ban knows what has happened to this host. Something attacking a hundred thousand other machines right now looks, to fail2ban, exactly like a first-time visitor, until it does enough here to trip a rule.

Why this one

The deciding property is shared reputation: participating hosts report the sources that attacked them, and every participant can act on what the others have already seen.

That changes the timing rather than the mechanism. Local-only detection is necessarily reactive, because the evidence it needs is the attack it is trying to stop, so the first several attempts always land. Reputation drawn from a population means a source that has been hammering other people arrives here already known.

For a lab with a small public surface, that asymmetry is most of the value. There is not much traffic here, and therefore not much local evidence to learn from. Borrowing evidence from a large population is the only way a small target gets to act early.

How it is actually used here

Live on both gateways, and deliberately nowhere else.

That scoping is the most interesting decision attached to this component, because the design originally said the opposite.

The architecture as first written put a CrowdSec agent on every host in the lab, reporting to a central instance on a dedicated monitoring machine. The automation to do it was written. A technical review then deleted the whole arrangement before any of it was deployed, and the reasoning is worth spelling out, because the instinct it corrects is a common one.

The tool’s distinguishing feature is crowd-sourced reputation about internet sources. On an internal network that value is not reduced, it is absent: the traffic is between the lab’s own machines, at private addresses that appear in no shared blocklist and never will. Deploying it there means running a reputation engine with no reputation available to it.

The internal deployment had a defensible justification of its own, which is why it survived the original design: detecting an attacker already inside the network is a real job, and it is not the job the edge deployment does. The review’s conclusion was that this real job is better done by host-based security monitoring, which was already in the design for exactly that purpose, and that running a second detection system alongside it bought overlap rather than coverage.

What the deleted arrangement would have produced is not neutral. It is alert volume, a second banning system with the ability to lock the operator out of their own network, and an impression of coverage where the mechanism providing it does not apply.

Deciding where a security tool does not go is the same class of decision as choosing it, and it gets less attention than it deserves. A tool used outside the conditions that make it work still generates output, and output is easily mistaken for protection.

Detection and enforcement are separate

CrowdSec splits into two parts, and the split is the thing to understand before deploying it.

The agent reads logs and makes decisions. It produces a list of sources that should be blocked, and it does nothing about them.

A bouncer is a separate component that enforces those decisions somewhere: in a firewall, a web server, a proxy. Installing the agent alone gives a system that detects everything correctly and blocks nothing, and it will look installed and working the whole time.

Which bouncers are deployed determines what is actually enforced and at which layer, and that is a deployment decision rather than a property of the tool.

What it cost

Its configuration is subtle in ways that fail quietly. Two separate incidents in this lab came from a credential or an endpoint being correct but in the wrong place: right value, wrong scope, no error. Both produced a component that started cleanly and did not do its job, which is the recurring theme of this blog’s errata and not specific to this tool. It is worth knowing going in that a clean start is not evidence of a working installation here.

A check that measured its own effect. While verifying behavior on a gateway, the measurement being taken was of a ban that the person running the check had triggered themselves. The result was real and told them nothing about anyone else’s traffic. Any tool that reacts to the traffic you generate while testing it has this hazard, and a test that trips the thing it is testing returns a number that feels like evidence and is not.

You are trusting a crowd. Acting on a shared blocklist means accepting decisions made from evidence you cannot see, about sources you have never met. When that is right it is early protection. When it is wrong it is a legitimate visitor who cannot reach your site and has no way to tell you, because the block happens before anything that could show them an error message. A shared feed is a dependency on somebody else’s false-positive rate.

It covers one layer of one part of the estate. By the scoping decision above, internal hosts are not covered by this at all. The design’s answer for those is host-based security monitoring, which is not deployed yet, and until it is, that is a stated gap rather than a covered one.

What would change the decision

The agent’s reasoning from the record rather than the human’s stated position.

  • If the shared signal stopped being the differentiator. The entire argument is reputation from a population. If that data thinned out, or moved behind a tier this lab would not buy, a simpler local-only tool would do the remaining job with less machinery.
  • If a single tool covered both the edge and the hosts well. Running one thing at the edge and a different thing internally is two things to operate. It is the right split today because the two jobs genuinely differ, and a tool that did both convincingly would be worth revisiting for that reason alone.

About CrowdSec

CrowdSec is an open source intrusion detection and prevention system developed by CrowdSec SAS and a community of contributors. It parses logs to identify malicious behavior, shares signals about attacking sources with a collaborative network of participating installations, and enforces decisions through separate components called bouncers that integrate with firewalls, web servers and proxies. The core engine is released under the MIT license.