Managing CrowdSec with Docker
This guide provides instructions on managing CrowdSec through Docker commands. You will learn how to view metrics, manage bans, install collections, update and upgrade hubs, add a bouncer, and manually ban or unban IP addresses.
Instructions
Viewing Metrics
To see the metrics for CrowdSec, use the following command:
docker exec crowdsec cscli metrics
Viewing Bans
To list the current bans, use the following command:
docker exec crowdsec cscli decisions list
Manually Installing Collections
To manually install a collection, such as the Traefik collection, use the following command:
docker exec crowdsec cscli collections install crowdsecurity/traefik
Updating Hubs
To update the CrowdSec hubs, use the following command:
docker exec crowdsec cscli hub update
Upgrading Hubs
To upgrade the CrowdSec hubs, use the following command:
docker exec crowdsec cscli hub upgrade
Adding a Bouncer
To add a bouncer, you first need to generate and save an API key. Then, use the following command:
docker exec crowdsec cscli bouncers add bouncer-traefik
Banning an IP
To manually ban an IP address, use the following command:
docker exec crowdsec cscli decisions add --ip 192.168.0.101
Unbanning an IP
To manually unban an IP address, use the following command:
docker exec crowdsec cscli decisions delete --ip 192.168.0.101
No Comments