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:

Filtercscli flagPanel 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 12345

    The 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:

  • nginx access log → HTTP probing, scanner detection, abusive paths.
  • sshd journal → SSH bruteforce.
  • jabali-stalwart journal → IMAP / SMTP authentication flood.
  • jabali-panel journal → panel login flood.
  • crowdsec-appsec log → 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 for captcha decisions.
  • 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"

Frequently asked questions

How do I list active CrowdSec decisions?
Run `cscli decisions list` to print every active decision. Add `--type ban`, `--scenario crowdsecurity/ssh-bf`, `--ip 203.0.113.42`, `--range 203.0.113.0/24`, or `--origin console` to filter. Add `--all` to include expired decisions. The Jabali Panel UI at /jabali-admin/security/crowdsec-decisions calls the same API with the same filters.
How do I delete a CrowdSec decision by IP?
`cscli decisions delete --ip 203.0.113.42` removes every active decision for that IP. To target a single decision when an IP has multiple, use the decision ID from `cscli decisions list --output raw`: `cscli decisions delete --id 12345`. The panel's Remove action does the same over the agent socket — no SSH needed.
How do I manually add a CrowdSec ban?
`cscli decisions add --ip 203.0.113.42 --duration 4h --reason "manual block"`. Duration accepts s|m|h|d suffixes. For a CIDR block: `--range 203.0.113.0/24 --duration 30d --type ban`. Manual decisions have origin=cscli in the list.
What is the difference between a decision and an allowlist?
Decisions expire (default a few hours to days). Allowlists are persistent, survive CrowdSec restarts, and take precedence over any active ban on the same IP. Use `cscli allowlists add my-office --range 203.0.113.0/24` or the Allowlist tab in the panel.
How long does it take for a deleted decision to unblock an IP?
`cscli decisions delete` invalidates the decision in LAPI immediately. Bouncers (cs-nginx-bouncer, cs-firewall-bouncer, cs-stalwart-bouncer) poll LAPI every 10 seconds by default, so blocking stops within 10 seconds of the delete.
What does the origin column mean in cscli decisions list?
origin=crowdsec means a local scenario tripped on log activity on this host. origin=CAPI means the decision came from the CrowdSec community blocklist. origin=cscli means it was added by hand with `cscli decisions add`, and origin=cscli-import means it was imported with `cscli decisions import`.