Skip to content

Cscli ban add

cscli ban add

Adds a ban against a given ip/range for the provided duration


Allows to add a ban against a specific ip or range target for a specific duration.

The duration argument can be expressed in seconds(s), minutes(m) or hours (h).

See time.ParseDuration for more informations.


cscli ban add ip 24h "scan"  
cscli ban add range 24h "the whole range"


  -h, --help   help for add

Options inherited from parent commands

  -c, --config string        path to crowdsec config file (default "/etc/crowdsec/config/default.yaml")
      --debug                Set logging to debug.
      --error                Set logging to error.
      --info                 Set logging to info.
  -o, --output string        Output format : human, json, raw. (default "human")
      --remediation string   Set specific remediation type : ban|slow|captcha (default "ban")
      --warning              Set logging to warning.