CrowdSec decisions cheat sheet: list, add, delete IPs with cscli
Last updated
A CrowdSec decision is a live ban, CAPTCHA challenge, or allowlist entry currently in force on the panel host. Decisions are produced automatically by CrowdSec scenarios watching your logs, pulled from the CrowdSec community blocklist, or added manually. This page shows both the cscli commands and the Jabali Panel UI at /jabali-admin/security/crowdsec-decisions.
Security → CrowdSec → Decisions. Live and historic list of every BAN, CAPTCHA, and ALLOWLIST decision currently in force on the panel host.
TL;DR — common cscli commands
# List every active decision on the host
cscli decisions list
# List only bans for a specific IP
cscli decisions list --ip 203.0.113.42
# Add a manual 4-hour ban for an IP
cscli decisions add --ip 203.0.113.42 --duration 4h --reason "manual block"
# Delete a decision by IP (removes every active decision for that IP)
cscli decisions delete --ip 203.0.113.42
# Delete a decision by ID (from `cscli decisions list`)
cscli decisions delete --id 12345
All three actions are also available in the panel UI, one click per row. Both surfaces write to the same LAPI, so a change made in the panel is visible immediately in cscli decisions list, and vice-versa.
cscli decisions list — filter cheat sheet
cscli decisions list prints every active decision by default. The panel calls the same API under the hood and passes the same filters:
| Filter | cscli flag | Panel UI |
|---|---|---|
| Type (ban/captcha/allowlist) | --type ban | ”Decision type” dropdown |
| Scenario | --scenario crowdsecurity/ssh-bf | ”Scenario” dropdown |
| IP or CIDR | --ip 203.0.113.42 / --range 203.0.113.0/24 | ”IP range (CIDR)” search |
Origin (crowdsec, cscli, CAPI, cscli-import) | --origin cscli | ”Origin” dropdown |
Example — list only bans added by hand with cscli:
cscli decisions list --type ban --origin cscli
Delete a CrowdSec decision by IP
Two options:
-
By IP — removes every active decision for that IP (typical when a user is unblocked by mistake):
cscli decisions delete --ip 203.0.113.42 -
By decision ID — targets a single decision when an IP has multiple:
cscli decisions delete --id 12345The ID column comes from
cscli decisions list --output raw.
In the panel: open the row’s action menu and pick Remove. The panel calls cscli decisions delete --id <id> on the host over the agent socket. No manual SSH.
Add a manual decision (block or allow an IP)
cscli decisions add creates a manual decision. Duration accepts s|m|h|d suffixes; scope defaults to Ip.
# 24-hour manual ban with reason
cscli decisions add --ip 203.0.113.42 --duration 24h --reason "manual block"
# 30-day CIDR ban
cscli decisions add --range 203.0.113.0/24 --duration 30d --type ban
For allowlists — persistent, survive CrowdSec restarts, and take precedence over bans — use the Allowlist tab in the panel or see the Allowlists guide. The single-command form is:
cscli allowlists add my-office --range 203.0.113.0/24
Columns
- IP (IPv4 or IPv6)
- Decision type (
ban,captcha,allowlist) - Scenario that triggered the decision (e.g.
crowdsecurity/ssh-bf,crowdsecurity/http-probing) - Origin (
crowdsec,cscli,CAPI,cscli-import; see Sources) - Duration remaining
- First seen, last seen
Filters
- Decision type
- Scenario
- IP range (CIDR)
- Origin
- Free-text search
Per-row actions
- Extend duration — add time to a current decision.
- Remove —
cscli decisions delete --id <id>via the agent. - Add to allowlist — promote the IP to a persistent allowlist entry (see Allowlists). The decision is removed in the same operation.
How decisions arise
Decisions are produced by CrowdSec scenarios, which match patterns in log streams from the bouncers:
nginxaccess log → HTTP probing, scanner detection, abusive paths.sshdjournal → SSH bruteforce.jabali-stalwartjournal → IMAP / SMTP authentication flood.jabali-paneljournal → panel login flood.crowdsec-appseclog → WAF rule trips.
Each scenario has a configurable severity, leakspeed (decay rate), and capacity (threshold). Modify them under Per-Scenario Override — same page, scenario-override tab.
Bouncers
Decisions are enforced by per-service bouncers:
crowdsec-nginx-bouncer— refuses HTTP requests from banned IPs at the nginx layer and presents the configured CAPTCHA page forcaptchadecisions.crowdsec-firewall-bouncer— drops packets from banned IPs in nftables, for every port, so mail (SMTP, IMAP, POP3) and SSH are covered too.
Sources
Each decision has an origin: crowdsec (detected on this server), cscli (added by hand), CAPI (the CrowdSec community blocklist) or cscli-import (imported with cscli decisions import). The Blocklists tab counts active decisions per source. The extra blocklists the admin turns on (see Firewall → Extra blocklists) are cscli-import decisions with the scenario jabali-list:<list>.
The panel is not connected to the CrowdSec console; console enrolment was removed, so no decisions are synced with it.
CLI
The standard cscli tool is also available on the host:
cscli decisions list
cscli decisions delete --id <id>
cscli decisions add --ip <ip> --duration 4h --reason "manual block"