Repository navigation
CrowdSec
🌐 English · Français
CrowdSec is a community-powered IP reputation service : a collaborative IDS that lets your hosts share threat intelligence. Arenet ships a native CrowdSec bouncer that blocks requests from IPs the CrowdSec community has flagged.
The CrowdSec agent itself runs separately (typically as a Docker container or systemd service on the same host). Arenet only embeds the bouncer — the component that queries the agent's Local API (LAPI) and enforces decisions.
┌─────────────────┐ ┌─────────────────┐ ┌──────────────────┐
│ Arenet │ ────▶ │ CrowdSec │ ◀──── │ CrowdSec Hub │
│ (bouncer) │ LAPI │ agent │ │ (community │
│ │ poll │ (your host) │ │ blocklists) │
└─────────────────┘ └─────────────────┘ └──────────────────┘
│ │
│ if IP in decision │ scenarios trigger
│ → reject with 403 │ on parsed log lines
▼ ▼
Client Local decisions
(banned IPs)
The agent parses your local logs (auth, web server, etc.), triggers on scenarios (brute-force, scanning, exploitation), and creates decisions (ban X for Y minutes). The bouncer polls the agent every N seconds and enforces.
You also get community decisions for free : the agent fetches the CrowdSec hub's curated blocklist of IPs currently abusive in the global community. Effectively a real-time blocklist updated by thousands of operators worldwide.
Run the agent on the same host as Arenet (or a reachable LAN host). Docker is easiest :
docker run -d --name crowdsec \
-e GID="$(getent group docker | cut -d: -f3)" \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /var/log:/var/log:ro \
-v crowdsec-db:/var/lib/crowdsec/data \
-v crowdsec-config:/etc/crowdsec \
-p 8080:8080 \
crowdsecurity/crowdsecThe agent's LAPI is now on http://<host>:8080.
docker exec crowdsec cscli bouncers add arenetThe command prints an API key — copy it.
- Sidebar → Settings → CrowdSec section
-
LAPI URL :
http://127.0.0.1:8080(or your agent's address) - API key : paste the key from step 2
-
Bouncer name :
arenet(matches the cscli registration) -
Timeout :
5s(default ; how long the bouncer waits for LAPI response) - Test connection → should return ✅
- Save
Within ~30 seconds the bouncer is active. Any inbound request whose source IP is in CrowdSec's current decision list returns 403 Forbidden before reaching the WAF / route handlers.
The bouncer enforces whatever decisions the agent has. Default scenarios (after cscli scenarios install crowdsecurity/http-cve etc.) include :
- Brute-force on SSH / web auth pages
- Scanning (nmap, masscan, web vuln scanners)
- Known exploit attempts (CVE-tagged scenarios)
- Community blocklist : IPs currently abusive across the CrowdSec network
You can extend with custom scenarios — see CrowdSec docs.
Every CrowdSec block emits a decision_event row in the SQLite decision_event table :
-
ts— timestamp -
src_ip— banned IP -
reason— scenario name (e.g.crowdsecurity/http-bf) -
duration— ban length -
origin—local(your agent's scenarios) orcrowdsec(community blocklist)
The /security/decisions page renders these with filter by origin + scenario + time. The unified /logs shows them alongside WAF / auth / rate-limit events.
# Find a currently-banned IP in your agent's decision list
docker exec crowdsec cscli decisions list
# Pick an IP from the output, then try to hit any of your routes from it
# (or, easier, run from a VM with that IP)
# Expected : the route returns 403 before reaching the WAFYou can also manually ban your own IP for a minute as a smoke test :
docker exec crowdsec cscli decisions add --ip "$(curl -s ifconfig.me)" --duration 60sTry to hit any route from your home → 403. After 60s the ban expires, the route works again.
CrowdSec is communal — sometimes an IP gets banned globally for behaviour your local users aren't doing. You have two safety valves :
docker exec crowdsec cscli decisions delete --ip <your-user-ip>
docker exec crowdsec cscli postoverflows install crowdsecurity/whitelists
# Then edit /etc/crowdsec/postoverflows/s01-whitelist/whitelists.yaml
# to add your user's IP / CIDRCurrently CrowdSec is global in Arenet (all routes or no routes). If you need to bypass it on a specific route, the workaround is to put that route on a different Arenet instance OR to whitelist the source IPs at the CrowdSec agent layer.
A per-route CrowdSec toggle is on the V3 backlog ; open an issue if you'd find it useful.
When the agent is unreachable (network blip, agent crash, restart), the bouncer fails open by default — requests pass through as if CrowdSec was disabled. This is the AC #13 degraded-mode contract : Arenet's own LAPI client never blocks legitimate traffic because the agent is having a bad day.
The dashboard's CrowdSec card shows the agent status (✅ reachable / system_health == degraded to get a Discord/email ping when the agent drops.
- WAF — layered defense ; WAF catches what CrowdSec doesn't
- Country Block — geo-fence layer above CrowdSec
- Alerting — pager when the agent is down
- CrowdSec official docs — agent install, scenarios, hub
- hslatman/caddy-crowdsec-bouncer — the Caddy module Arenet uses
-
internal/crowdsec/— Arenet's wrapping (sink, observability adapter)
- Home · Accueil
- Installation · Installation 🇫🇷
- Routes · Routes 🇫🇷
- TCP / UDP services · Services TCP / UDP 🇫🇷
- DNS Providers · DNS Providers 🇫🇷
- Topology · Topology 🇫🇷
- WAF · WAF 🇫🇷
- CrowdSec · CrowdSec 🇫🇷
- Allowlists · Allowlists 🇫🇷
- Country Block · Country Block 🇫🇷
- Rate Limit · Rate Limit 🇫🇷
- OIDC SSO · OIDC SSO 🇫🇷
- Forward auth · Forward auth 🇫🇷
- Certificates · Certificats 🇫🇷
- Updating Arenet · Mettre à jour 🇫🇷
- Backup & Restore · Backup & Restore 🇫🇷
- Alerting · Alerting 🇫🇷
- Custom Error Pages · Custom Error Pages 🇫🇷
- API (OpenAPI) · API (OpenAPI) 🇫🇷
- Troubleshooting · Troubleshooting 🇫🇷