First commit

This commit is contained in:
2025-08-19 13:33:28 +02:00
commit 1b3cf07b19
7 changed files with 249 additions and 0 deletions

32
templates/report.html Normal file
View File

@@ -0,0 +1,32 @@
Fail2Ban Daily Report
Here is the daily report for {{ server_name }} on {{ report_date.strftime("%x") }}.
Statistics
* {{ all_bans|length }} all-time bans
* {{ daily_bans|length }} ban action performed (all jails)
* {{ unique_ips|length }} unique IP banned
* {{ new_bans|length }} newly seen IP banned
* {{ recidivist_bans|length }} recidivist IP banned
{% if unique_ips %}
Unique IPs banned today:
{% for ip in unique_ips %}
- {{ ip }} (banned {{ unique_ips[ip].count }} times) {{ 'NEW!' if unique_ips[ip].new }}
{% endfor %}
{%endif %}
{% if recidivist_bans %}
Recidivist IPs banned:
{% for ban in recidivist_bans %}
- {{ ban.ip }} ({{ ban.ban_time.strftime("%X") }})
{% endfor %}
{% endif %}
{% if all_recidivist_bans %}
All recidivist IPs banned:
{% for ban in all_recidivist_bans %}
- {{ ban.ip }} ({{ ban.ban_time.strftime("%c") }})
{% endfor %}
{% endif %}