RousselTMLEARNING

TP · CrowdSec: From Discovery to Expertise

Lab 1: Install CrowdSec and detect SSH brute force

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. 1. The Compose file

    Why? Volumes keep configuration and database. Without a volume on /var/lib/crowdsec/data, the image refuses to start.

    Create compose.yaml.
  2. 2. Declare the logs

    Create one acquisition file per source, then start.

  3. 3. Check the installation

    Check collections and the sources being read.

  4. 4. Simulate an attack

    Why? Only new lines are analyzed: we add them after startup.

    Add eight failed logins.
  5. 5. Query the LAPI

    Create a bouncer key and ask for the status of two addresses.

Difficulty level : ●○○○○ (1/5)

My progress

  • ⏱ Estimated time : ≈ 40 min

Sign in to track your progress and take notes. Sign in

💬 Ask a question

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...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!