2017-08-25 14:17:59 +02:00
|
|
|
# fail2ban-report
|
2017-08-25 15:39:30 +02:00
|
|
|
This tool generate a simple report of fail2ban activity.
|
2017-08-25 15:28:37 +02:00
|
|
|
|
2017-08-25 15:39:30 +02:00
|
|
|
[Example PDF report](report.pdf)
|
2017-08-25 15:28:37 +02:00
|
|
|
|
2017-08-25 15:39:30 +02:00
|
|
|
## Extract fail2ban logs in a CSV file
|
2017-08-25 15:28:37 +02:00
|
|
|
|
2017-08-25 15:39:30 +02:00
|
|
|
```bash
|
|
|
|
$ ./fail2ban-getlog log.csv
|
|
|
|
```
|
|
|
|
You should create a cron task to regulary run `fail2ban-getlog log.csv` and populate CSV file.
|
2017-08-25 15:28:37 +02:00
|
|
|
|
2017-08-25 15:39:30 +02:00
|
|
|
## Generate the PDF report using the CSV data and GeoLite2-Country database
|
2017-08-25 15:28:37 +02:00
|
|
|
|
2017-08-25 15:39:30 +02:00
|
|
|
```bash
|
2017-08-25 15:28:37 +02:00
|
|
|
./fail2ban-report log.csv GeoLite2-Country.mmdb report.pdf
|
2017-08-25 15:39:30 +02:00
|
|
|
```
|
2017-08-25 15:28:37 +02:00
|
|
|
|
2017-08-25 15:39:30 +02:00
|
|
|
Link to GeoLite2-Country database [HERE](http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz).
|