What you will learn in this TP
- Understand a line with explain
- Write a leaky scenario
- Use simulation
- Protect a trusted IP
Introduction #
What you will learn in this section
- Understand a line with explain
- Write a leaky scenario
- Use simulation
- Protect a trusted IP
Context. Your application returns 401 on /login on failure. You want a custom rule, tested before blocking.
Prerequisites: lab 1 · Estimated time: 40 min
Setup #
Guided steps, with their solution.
1. Understand a line
Follow the path of an Nginx line.
2. Write the scenario
Why? Four failures in a burst is an attack; an occasional failure is human error.
Add the file to the container, then restart.3. Switch to simulation
Trigger the scenario in simulation.
4. Protect a trusted IP
Add the range to an allowlist and see decisions removed.
Difficulty level : ●●○○○ (2/5)
My progress
Sign in to track your progress and take notes. Sign in
Recommended Articles
CrowdSec collections, parsers and scenarios
The Hub, collections, the parser pipeline and scenarios: install, understand with cscli explain, ...
Decisions, profiles, allowlists and AppSec in CrowdSec
Manage decisions with cscli, adapt block duration and type with profiles, avoid false positives w...
CrowdSec: understanding the collaborative firewall
What CrowdSec is, how it detects and blocks attacks: Security Engine, parsers, scenarios, Local A...
CrowdSec in production: best practices
Good habits for running CrowdSec in production: LAPI, keys, false positives, database, upgrades a...
Application Protection
Learn how to secure your backends against abuse and common attacks. A practical guide to Rate Lim...
CrowdSec bouncers: Cloudflare, network devices, Kubernetes and custom bouncer
Block at the CDN with Cloudflare Workers, feed pfSense or MikroTik with Blocklist Mirror, protect...
Installing and configuring CrowdSec: packages, Docker, acquisition
Install CrowdSec with packages or Docker, understand its files, declare the logs to read, enroll ...
CrowdSec or Fail2ban: what are the differences?
Comparing CrowdSec and Fail2ban: detection, blocking, sharing, performance, multi-server, and how...
CrowdSec bouncers: principles and firewall bouncer
Understanding CrowdSec bouncers: where to block, live and stream modes, API keys, decisions API, ...