Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
Last active December 19, 2022 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmbaughman/7af1c03ece28559c7249c51740fa8312 to your computer and use it in GitHub Desktop.
Save cmbaughman/7af1c03ece28559c7249c51740fa8312 to your computer and use it in GitHub Desktop.
Crowdsec Commands

Useful Crowdsec Commands

Update

cscli hub update && cscli hub upgrade

Restart

systemctl restart crowdsec

Get Metrics

cscli metrics

Hub List

This command will let you see which parsers and scenarios are deployed.

cscli hub list

View Alerts

cscli alerts list

Decisions List

This command allows you to see which IPs are banned, very useful to check if you are suddenly getting “Forbidden” pages when accessing your server.

cscli decisions list

Block an IP

Add an IP to the block list, you could add your IP to test if it's blocking requests.

cscli decisions add --ip 1.2.3.4

Unblock an IP

cscli decisions delete --ip 1.2.3.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment