CrowdSec
Crowd-powered, open-source cybersecurity engine and modern alternative to Fail2ban and Cloudflare WAF.
Why consider CrowdSec?
CrowdSec is an open-source, collaborative intrusion prevention system. It parses server logs, detects malicious behaviors, and shares threat intelligence across a global community network.
Learn CrowdSec by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide10 sections
What is CrowdSec?
CrowdSec is an open-source, collaborative cybersecurity engine and Intrusion Prevention System (IPS) written in Go. Often described as a modern, crowd-sourced evolution of Fail2ban, CrowdSec analyzes system logs to detect malicious application behavior (SSH brute force, HTTP port scans, SQL injection, Layer 7 DDoS, credential stuffing) and responds by blocking malicious IPs across firewalls and reverse proxies.
What makes CrowdSec unique is its collaborative threat intelligence network: when an IP attacks one CrowdSec user, that IP is validated and distributed to all community nodes globally, preemptively shielding the entire network from attacks.
Who Is It For?
- Sysadmins & DevOps Engineers: Protecting Linux VPS instances, Kubernetes ingress controllers, and SSH servers from brute force and vulnerability exploitation.
- Web Application Operators: Defending web applications (WordPress, Next.js, Django, Laravel) from bot attacks, scrapers, and automated vulnerability scanners.
- Enterprise Security Teams: Ingesting real-time global cyber threat intelligence feeds into corporate SIEM and firewall systems.
Key Features
- Collaborative threat intelligence: Automatically block malicious IPs identified across millions of community servers worldwide.
- Universal log parsing: Ingest logs from Syslog, Nginx, Apache, Traefik, Caddy, Docker, and systemd journal.
- Modular remediation Bouncers: Enforce blocks at the Linux firewall (iptables/nftables), reverse proxy, Cloudflare, or application level.
- Multi-scenario detection hub: Pre-built community rules for detecting SSH brute-force, web crawlers, CVE exploits, and DDoS.
- Centralized Cloud Console for monitoring attack alerts across a fleet of distributed servers.
Installing CrowdSec on Ubuntu / Debian
# 1. Install CrowdSec security engine repositorycurl -s https://packagecloud.io/install/repositories/crowdsecurity/crowdsec/script.deb.sh | sudo bashsudo apt install crowdsec -y# 2. Install the Firewall Remediation Bouncer (iptables / nftables)sudo apt install crowdsec-firewall-bouncer-iptables -yVerify detected log sources and installed scenarios:
sudo cscli metricssudo cscli scenarios listsudo cscli decisions listPractical Use Cases
1. Preemptive Botnet and Brute Force Blocking
A newly launched cloud server installs CrowdSec; within minutes, the server blocks over 20,000 known malicious attacking IPs distributed by the CrowdSec global community consensus.
2. Nginx Layer 7 Web Application Protection
A team installs the CrowdSec Nginx Bouncer; when a malicious scraper attempts SQL injection or path traversal exploits, CrowdSec returns a 403 Forbidden or captcha challenge instantly.
3. SSH Brute Force Mitigation
An automated bot attempts 50 failed SSH root logins within 30 seconds; CrowdSec detects the pattern and bans the attacking IP at the kernel firewall level for 4 hours.
Troubleshooting and Limitations
- Bouncer Installation Requirement: CrowdSec engine detects attacks and makes decisions, but requires a Bouncer (e.g. firewall bouncer, Nginx bouncer) to actually enforce the block; always install at least one remediation bouncer.
- Custom Application Logs: If running web servers inside Docker, point CrowdSec's
/etc/crowdsec/acquis.yamlto the Docker container log paths or Syslog socket.
Official Resources
- Official Website: https://crowdsec.net
- GitHub Repository: https://github.com/crowdsecurity/crowdsec
- Documentation: https://docs.crowdsec.net
Related tools
More options with a similar category or technology profile.
boringproxy
Simple, self-hosted reverse proxy and tunnel manager for exposing private web services securely.
OWASP ModSecurity
Open-source Web Application Firewall (WAF) engine providing cross-platform HTTP security inspection.
OpenCTI
Open-source platform for managing cyber threat intelligence knowledge and STIX2 relationships.
Maltrail
Malicious traffic detection system utilizing public blacklists and heuristic traffic behavior analysis.