mirror of
https://github.com/ultimateplayer1999/crowdsec-bitninja-interaction.git
synced 2025-07-01 23:59:42 -04:00
Updated README
This commit is contained in:
28
README.md
28
README.md
@ -7,3 +7,31 @@ Dotenv:
|
|||||||
`go get github.com/joho/godotenv`
|
`go get github.com/joho/godotenv`
|
||||||
|
|
||||||
To get it working, copy example.env to .env and change the values when needed. Otherwise it uses the default.
|
To get it working, copy example.env to .env and change the values when needed. Otherwise it uses the default.
|
||||||
|
|
||||||
|
To run it, you can use `go run main list` to receive all active bans. To build a local executable, you can use
|
||||||
|
`go build -o bitninja-manager main.go`
|
||||||
|
|
||||||
|
to build it as bitninja-manager
|
||||||
|
|
||||||
|
The available commands are:
|
||||||
|
|
||||||
|
Receive all currently banned IPs (logged):
|
||||||
|
`go run main.go list`:
|
||||||
|
|
||||||
|
Get stats:
|
||||||
|
`go run main.go stats`
|
||||||
|
|
||||||
|
Manually cleanup expired bans:
|
||||||
|
`go run main.go cleanup`
|
||||||
|
|
||||||
|
Manually ban/Add a IP:
|
||||||
|
`go run main.go add 192.168.1.100 24h "Brute force attack" '{"severity":"high","source":"fail2ban"}'`
|
||||||
|
|
||||||
|
Perma ban IP:
|
||||||
|
`go run main.go add 192.168.1.102 permanent "Serious threat" '{"threat_level":"critical"}'`
|
||||||
|
``
|
||||||
|
|
||||||
|
Manually unban a IP:
|
||||||
|
`go run main.go del 192.168.1.100`
|
||||||
|
|
||||||
|
IP is ofcourse a dummy and go run main.go can be replaced with the binary like: `./bitninja-manager` for the local directory
|
||||||
|
Reference in New Issue
Block a user