CrowdSec vs fail2ban
Both read your logs and block the addresses behind failed logins and other attacks. They differ in where the decision is made, where the block is applied, and whether you learn from other people's attackers. Neither looks at what runs on a server after a login succeeds.
| fail2ban | CrowdSec | |
|---|---|---|
| License and price | Free, open source (GPL-2.0) | Security engine free, open source (MIT); optional Console with a free Community plan and paid plans |
| Reads | Log files, such as /var/log/auth.log, sshd and Apache logs out of the box | Log files and HTTP requests from compatible web servers |
| Blocks with | The server's own firewall rules, for a set time | Remediation components ("bouncers") for the firewall, web server, reverse proxy or CDN |
| Several servers | Each server decides alone | Detect on one machine, block on another, through a local API |
| Shared intelligence | None: each server learns each attacker itself | A community blocklist for users who share the attacks they detect |
| Web attacks | Only what a log filter matches | An AppSec (WAF) component that loads ModSecurity rules and the OWASP Core Rule Set |
| Written in | Python | Go |
How fail2ban works
fail2ban watches log files with filters, regular expressions for lines such as a failed SSH password. When one address matches too often within a time window, a jail runs an action, usually a firewall rule that rejects that address for a set time.
It is packaged in most distributions and works the evening you install it. Its own README is plain about the limit: it can reduce the rate of password guessing, but it cannot remove the risk of weak authentication, so SSH keys or two-factor logins still matter.
How CrowdSec works
CrowdSec splits the job in two. A log processor reads logs and HTTP requests and matches behaviour patterns it calls scenarios. Separate remediation components enforce the decision wherever you choose: iptables or nftables, nginx, a reverse proxy or a CDN. A local API connects them, so one machine can detect and many can block.
If you share the attacks you detect, the engine downloads a curated community blocklist in return, so addresses attacking other users can be blocked before they reach you.
Which to use
- One or two servers, SSH keys only, nothing else to manage: fail2ban is enough, and it keeps everything in text files on the server.
- Web applications, several servers, or blocking at the edge: CrowdSec, for its bouncers, its WAF component and the shared blocklist.
- Both are about who is knocking. If you also need to know what runs on a server and what it connects to once someone is in, that is a host security agent's job, not a log banner's.
Where Vigilhold fits
Vigilhold is a hosted security agent for Linux servers and Docker hosts. It bans attacking addresses too, and it watches processes, network connections, file changes and logins, then responds within limits you set, with every action in an audit log you can undo from. It runs next to fail2ban or CrowdSec, and uses fail2ban for its own bans when fail2ban is installed.
Checked in November 2026: fail2ban README, CrowdSec Security Engine introduction, CrowdSec on GitHub, CrowdSec Console pricing.
Vigilhold vs fail2ban · Vigilhold vs CrowdSec · Vigilhold vs Wazuh · Start a 14-day free trial