Beta 4 : Version 0.4.0 : Docker
you asked for π³, so i built it : β this Repo if you like it
A simple and clean web-based dashboard to turn your daily Fail2Ban logs into searchable and filterable JSON reports β with optional IP blocklist management for UFW.
This version brings more stability and performance, as well as improved visibility into Fail2Ban events.
Integration
Designed for easy integration on a wide range of Linux systems β from small Raspberry Pis to modest business setups β though itβs not (yet) targeted at large-scale enterprise environments. Flexibility comes from the two backend shell scripts, which you can adapt to your specific environment or log sources to provide the JSON data the web interface needs (daily JSON event files).
π‘οΈ Note: This tool is a visualization and management layer β it does not replace proper intrusion detection or access control. Deploy it behind IP restrictions or HTTP authentication.
The Docker version is always based on the native version and therefore receives updates after the native release, with a slight delay to ensure stability and integration.
The Docker-Version of Fail2Ban-Report has all you need for an easy start - single Script Setup - you can access archive/ to manage blocklists and /opt/Fail2Ban-Report/ for Settings like in the native Version, all Web-Related Stuff is inside of the container. There is a Helper-Script.sh to enable you to take actions in the container itself and to propper set up .htaccess, therefore nano is present in the container.
β οΈ Never! expose to the internet without https and propper restrictions set up (htaccess has to be edited)β οΈ
Fail2Ban-Report parses your fail2ban.log
and generates JSON-based reports viewable via a responsive web dashboard.
It provides optional tools to:
- π Visualize ban and unban events, including per-jail statistics
- β‘ Interact with IPs (e.g., manually block, unblock, or get report from external services)
- π Maintain jail-specific persistent blocklists (JSON) with
active
andpending
status - π Sync those lists with your system firewall using ufw
- π¨ Show warning indicators when ban rates exceed configurable thresholds
- π¨ Show Markers when a IP Address is present more than once in one (yellow) or more (red) jails.
Note: Direct integration with other firewalls or native Fail2Ban jail commands is not yet implemented.
-
Backend Shell Scripts:
- Parse logs and generate daily JSON event files
- Maintain and update
*.blocklist.json
- Apply or remove firewall rules based on blocklist entries (
ufw
)
-
Frontend Web Interface:
- Displays event timelines, statistics, and per-jail blocklists
- Allows multi-selection for bulk ban/report actions
- Shows pending status for unprocessed manual actions
- Displays real-time warning indicators
-
JSON Blocklists:
- Stored per jail
- Contain IP entries with metadata (
active
,pending
, timestamps, jail name)
- π Searchable + filterable log reports (date, jail, IP)
- π§ Integrated JSON blocklist for persistent Block-Overview
- π§± Firewall sync using UFW (planned: nftables, firewalld)
- β‘ Lightweight setup β no DB, no frameworks
- π Compatible with hardened environments (no external assets, strict headers)
- π οΈ Installer script to automate setup and permissions
- π§© Modular design for easy extension
- πͺ΅ Optional logging of block/unblock actions (set true/false and logpath in
firewall-update.sh
) - π΅οΈ Optional Feature : IP reputation check via AbuseIPDB (manual lookup from web interface)
π§° Works even on small setups (Raspberry Pi, etc.)
If you want to join the conversation or have questions or ideas, visit the π¬ Discussions page.
- Optimized
firewall-update.sh
for faster batch processing of IPs. - Batch blocking per jail with a single
ufw reload
. - Safe unblocking with rule renumbering and reload after each deletion.
- JSON updates and cleanup done once per jail, not per IP.
- Core mechanisms, logging, and permissions unchanged.
This significantly reduces both the runtime and the lock duration of the blocklists, especially during ban events.
- Minor visual improvements in:
header.php
,fail2ban-logstats.php
,fail2ban-logstats.js
index.php
(IP sorting)style.css
- IP Event Markers: Highlights repeated events per IP (yellow) and IPs in multiple jails (red).
- Sortable & Filterable Mark Column: New column
Mark
with dropdown filter. - Dynamic Filtering: Markers update live with Action, Jail, IP, or Date filters.
- Marker column placed between Action and IP, responsive layout preserved.
- Added a new "Copy to Clipboard" button to export the currently filtered table data.
- Implemented a dedicated JavaScript file
assets/js/table-export.js
for the copy functionality. - Integration with existing DataTables filtering logic to ensure only visible/filtered rows are copied.
- Output Format: Tab-separated values (TSV) with all HTML tags removed for clean text export.
- User Feedback:
- Shows a warning if thereβs no data to copy.
- Shows a success or error alert based on the clipboard operation result.
This Feature will only work with enabled https for security reasons
- A read-only + action-enabled web dashboard for Fail2Ban events
- A tool to visualize bans/unbans and manually manage blocked IPs
- A log parser + JSON generator that works alongside your existing Fail2Ban setup
- A way to sync a persistent blocklist with your firewall (currently UFW only)
- Designed for sysadmins who want quick insights without SSH-ing into the server
- β A replacement for Fail2Ban itself (it depends on Fail2Ban)
- β A real-time IDS/IPS (data updates depend on log parsing intervals)
- β A universal firewall manager (no native support for iptables/nftables, etc. β yet)
- β A tool for automatic jail management (manual actions only for now)
- β A heavy analytics platform β itβs lightweight and log-driven by design
- Found a bug? β Open an issue
- Found a bug? β Open an issue
Before you begin, make sure the following are installed on your host system:
- Docker (latest stable version)
- Docker Compose (v2 or later)
- a working Fail2Ban setup with log files accessable for shellscripts
- UFW installed
apt update -qq && apt upgrade -y -qq && apt autoremove -y -qq && apt install git fail2ban ufw docker docker-compose -y -qq
Your project should look like this:
/
βββ Shellscripts/ # Bash scripts used inside/outside Docker
βββ Fail2Ban-Report/ # Web frontend + PHP + assets + archive (copied into container)
βββ Helper-Script.sh # Enables you to make changes in the running Container
βββ installer.sh # Automatic installation script for Docker
βββ docker-compose.yml # Docker Compose configuration
βββ Dockerfile # Dockerfile for the web frontend
ether per .zip File or
git clone https://github.com/SubleXBle/Fail2Ban-Report-Docker
cd Fail2Ban-Report-Docker
You can moove the folder to wherever you want to keep your images on your Host if you are familiar with docker, you can easy change the dockerfile and docker-compose.yml or .htaccess to fit your needs (e.g.: ports) prior installation.
Default Ports are set to
80:80
443:443
you would have to change this prior installation indocker-compose.yml
andDockerfile
to propper connect to your reverse proxy
chmod +x Installer.sh
./Installer.sh
- Build the Docker image
- Set up and start the Docker container
- Configure volume mounts for data persistence
- Apply initial permissions for the archive directory
The Installer will show you defaults : you HAVE to type in something (e.g.: defaults that are shown by Installer) else it will not be set in config!
make sure it is executeable
chmod +x Helper-Script.sh
./Helper-Script.sh
this will take you to /var/www/html of the Container, so you can:
cd Fail2Ban-Report && nano .htaccess
- edit .htaccess for more security
- create a .htpasswd (best place would be in /var/www/ - so outside of the webroot)
- you can also create a html file in www with a redirect to Fail2Ban-Report/ or whatever you like
After installation, open your browser and visit:
https://<your-server-ip>/Fail2Ban-Report
(Default port can be defined in docker-compose.yml.)
crontab -e
*/5 * * * * /opt/Fail2Ban-Report/./fail2ban_log2json.sh
*/5 * * * * /opt/Fail2Ban-Report/./firewall-update.sh
set to */10 or */15 - to let shellscripts run with 10 or 15 minute timer
make sure Shellscripts are executeable
chmod +x /opt/Fail2Ban-Report/fail2ban_log2json.sh
chmod +x /opt/Fail2Ban-Report/firewall-update.sh
Congratulations!, you should now have a fully working Setup
First Login - Check
- login security works (htaccess file)
- https is setup correctly
restart container
docker-compose stop && docker-compose start
or
docker-compose restart
If you want to Reset the installation you can do so by stopping the container
docker-compose stop
then you can delete the container
docker container prune
and rebuild it
docker-compose build && docker-compose up -d
then everything in Web will be reinstalled, Stuff outside of Web (archive/ and opt/Fail2Ban-Report/) will persist