What you will learn in this TP
- Start CrowdSec with Docker
- Declare the logs to read
- Read alerts and decisions
- Query the LAPI like a bouncer
Introduction #
What you will learn in this section
- Start CrowdSec with Docker
- Declare the logs to read
- Read alerts and decisions
- Query the LAPI like a bouncer
Context. Your server faces SSH login attempts. You want to see CrowdSec recognize them, without blocking anything yet.
Prerequisites: Docker, Docker Compose · Estimated time: 40 min
Setup #
Guided steps, with their solution.
1. The Compose file
Why? Volumes keep configuration and database. Without a volume on
Create/var/lib/crowdsec/data, the image refuses to start.compose.yaml.2. Declare the logs
Create one acquisition file per source, then start.
3. Check the installation
Check collections and the sources being read.
4. Simulate an attack
Why? Only new lines are analyzed: we add them after startup.
Add eight failed logins.5. Query the LAPI
Create a bouncer key and ask for the status of two addresses.
Difficulty level : ●○○○○ (1/5)
My progress
Sign in to track your progress and take notes. Sign in
Recommended Articles
Installing and configuring CrowdSec: packages, Docker, acquisition
Install CrowdSec with packages or Docker, understand its files, declare the logs to read, enroll ...
Application Protection
Learn how to secure your backends against abuse and common attacks. A practical guide to Rate Lim...
CrowdSec or Fail2ban: what are the differences?
Comparing CrowdSec and Fail2ban: detection, blocking, sharing, performance, multi-server, and how...
CrowdSec collections, parsers and scenarios
The Hub, collections, the parser pipeline and scenarios: install, understand with cscli explain, ...
CrowdSec bouncers for Nginx, Apache and HAProxy
Setting up CrowdSec bouncers for Nginx, OpenResty, Apache and HAProxy SPOA: configuration, block ...
Protecting Traefik with CrowdSec: the bouncer plugin
Setting up the CrowdSec bouncer in Traefik: plugin, middleware, stream and live modes, real IP be...
CrowdSec: understanding the collaborative firewall
What CrowdSec is, how it detects and blocks attacks: Security Engine, parsers, scenarios, Local A...
CrowdSec bouncers: principles and firewall bouncer
Understanding CrowdSec bouncers: where to block, live and stream modes, API keys, decisions API, ...
CrowdSec bouncers: Cloudflare, network devices, Kubernetes and custom bouncer
Block at the CDN with Cloudflare Workers, feed pfSense or MikroTik with Blocklist Mirror, protect...