canasta crowdsec ban

From Canasta Wiki

canasta > crowdsec > ban

canasta crowdsec ban

Block an IP via a manual CrowdSec decision

Synopsis

Add a manual CrowdSec decision blocking an IP address, independent of the engine's automatic detection. Defaults to a 4-hour ban.

canasta crowdsec ban [flags]

Examples

canasta crowdsec ban 203.0.113.50
canasta crowdsec ban 203.0.113.50 --duration 24h --reason scraper
canasta crowdsec ban 203.0.113.50 -i mysite

Flags

Flag Shorthand Description Default Required Orchestrator
--duration Ban duration (e.g. 4h, 24h, 7d). Default: CrowdSec's 4h Both
--id -i Canasta instance ID * Both
--ip IP address to block Both
--reason Reason recorded with the decision Both

* Defaults to the Canasta instance matching the current directory, if any.

Global Flags

Flag Shorthand Description Default Required Orchestrator
--help -h Show help message and exit Both
--verbose -v Enable verbose output Both