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
All steps and instructions are shown. Recommended for this lab: guided
Introduction #
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
/var/lib/crowdsec/data, the image refuses to start.Createcompose.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.
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●○○○○ (1/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
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...