mirror of
https://github.com/pldubouilh/blockfast.git
synced 2026-09-02 15:17:48 -04:00
rename json to caddy
it was misleading
This commit is contained in:
committed by
Pierre Dubouilh
parent
e8437d33fb
commit
2df9519224
@@ -3,8 +3,8 @@
|
||||
Block internets scanners fast 🍶
|
||||
|
||||
Features:
|
||||
- Common Log Format parser (apache logs, etc...)
|
||||
- JSON log parser (caddy logs)
|
||||
- Common Log Format parser (apache, nginx logs, etc...)
|
||||
- Caddy JSON log parser
|
||||
- Generic log parser
|
||||
- Sane defaults
|
||||
- Fast ip ban with `ipset`
|
||||
@@ -13,15 +13,15 @@ Features:
|
||||
|
||||
## example
|
||||
```txt
|
||||
$ ./blockfast -j=/caddy/logs
|
||||
1737927469 - starting with json parsing at "/tmp/jsontest"
|
||||
$ ./blockfast --caddy-logpath=/caddy/logs
|
||||
1737927469 - starting with caddy parsing at "/tmp/caddytest"
|
||||
1737927469 - jail setup, allowance 5, time 21600s
|
||||
1737927477 - json logged offence for 9.124.36.195
|
||||
1737927478 - json logged offence for 9.124.36.195
|
||||
1737927479 - json logged offence for 9.124.36.195
|
||||
1737927479 - json logged offence for 9.124.36.195
|
||||
1737927480 - json logged offence for 9.124.36.195
|
||||
1737927480 - json jailtime for 9.124.36.195
|
||||
1737927477 - caddy logged offence for 9.124.36.195
|
||||
1737927478 - caddy logged offence for 9.124.36.195
|
||||
1737927479 - caddy logged offence for 9.124.36.195
|
||||
1737927479 - caddy logged offence for 9.124.36.195
|
||||
1737927480 - caddy logged offence for 9.124.36.195
|
||||
1737927480 - caddy jailtime for 9.124.36.195
|
||||
```
|
||||
|
||||
## build
|
||||
@@ -34,11 +34,11 @@ Blockfast - block internets scanners fast 🍶
|
||||
Author: pierre dubouilh <pldubouilh@gmail.com>
|
||||
|
||||
Blockfast reads logs from various sources and blocks the offending IPs using iptables and ipset.
|
||||
It supports logs in Common-Log-Format (Apache, etc..), JSON (Caddy) and a generic logs parser.
|
||||
It supports logs in Common-Log-Format (Apache, nginx, etc..), Caddy JSON and a generic logs parser.
|
||||
|
||||
Example:
|
||||
# block invalid http statuses from caddy
|
||||
./blockfast -j=/caddy/logs
|
||||
./blockfast --caddy-logpath=/caddy/logs
|
||||
|
||||
# generic log parser example with a log text to flag, and a regex to parse the offending IP.
|
||||
./blockfast --generic-logpath=/tmp/generictest --generic-positive='Failed password' --generic-ip='from ([0-9a-fA-F:.]+) port'
|
||||
@@ -52,10 +52,10 @@ Options:
|
||||
how many offences allowed (max 255) [default: 5]
|
||||
-v, --verbose
|
||||
log all offences
|
||||
-c, --clf-logpath <CLF_LOGPATH>
|
||||
path of Common-Log-Format logfile (Apache, etc..), can be repeated
|
||||
-j, --json-logpath <JSON_LOGPATH>
|
||||
path of JSON logfile (works with Caddy), can be repeated
|
||||
--clf-logpath <CLF_LOGPATH>
|
||||
path of Common-Log-Format logfile (Apache, nginx, etc..), can be repeated
|
||||
--caddy-logpath <CADDY_LOGPATH>
|
||||
path of Caddy JSON logfile, can be repeated
|
||||
--generic-logpath <GENERIC_LOGPATH>
|
||||
generic parser log file path, can be repeated
|
||||
--generic-ip <GENERIC_IP>
|
||||
@@ -65,7 +65,7 @@ Options:
|
||||
--generic-negative <GENERIC_NEGATIVE>
|
||||
generic parser negative - if a logline contains this, it is considered good, the rest is bad
|
||||
--invalid-http-statuses <INVALID_HTTP_STATUSES>
|
||||
invalid http statuses (for CLF and JSON logs). Coma separated list, accepts ranges with XX [default: 400,401,402,403]
|
||||
invalid http statuses (for CLF and Caddy logs). Coma separated list, accepts ranges with XX [default: 400,401,402,403]
|
||||
-h, --help
|
||||
Print help
|
||||
-V, --version
|
||||
|
||||
Reference in New Issue
Block a user