update README

This commit is contained in:
rmanach 2025-05-25 15:50:54 +02:00
parent d780f2ba6c
commit 82e2ad8a39

View File

@ -25,7 +25,7 @@ Create a `conf.json` next to the script. Use the [conf.json.example](./conf.json
```
* **codes**: List of unauthorized HTTP codes
* **contents**: string parts that are not not allowed in the request URL (ex: /x00, .json, .php, .env.local, etc...)
* **agents** string parts that are not not allowed in user-agent (ex: bot)
* **agents**: string parts that are not not allowed in user-agent (ex: bot)
* **whitelist**: List of IP to whitelist (ex: 192.168.1.1)
## Run
@ -56,6 +56,8 @@ python ufwban.py --refresh
* Live mode:
```bash
# Read and parse Nginx logs on each new entry and ban ip
# Read and parse Nginx access logs on each new entry and ban ip
tail -f /var/log/nginx/access.log | python ufwban.py
```
For each modes, a log is available to show which ip has been banned: `ufwban.log`.