Self-hosted
All data stays on your server. No external telemetry, no third-party dashboards.
Real-time fail2ban intelligence. No database. No build step. Just static files.
Why f2b-dashboard
A dashboard that respects your infrastructure. No containers to tune, no databases to back up.
All data stays on your server. No external telemetry, no third-party dashboards.
Results are written as static JSON. Cron refreshes them on your schedule.
Pure HTML, CSS, and JavaScript. Open it with any static file server or directly in a browser.
Attack sources are mapped to countries and cities using the free IP-API tier.
Features
Everything you want to know about incoming attacks, organized in one place.
See attack volume over time with interactive ECharts visualizations and time-range filtering.
Geo-locate attackers on a world map. Spot patterns by country and region at a glance.
Dive into each fail2ban jail: top IPs, ban ratio, unique attackers, and configuration.
Browse and filter recent fail2ban events without leaving the dashboard.
How it works
The parser reads your logs, GeoIP enriches the IPs, and the static UI renders the JSON.
Quick start
Clone the repo to /opt, run the parser once, and open the dashboard. Then add a cron job to keep it fresh.
Install into /opt/f2b-dashboard and make the scripts executable.
Generate dashboard.json from your logs, then add GeoIP data.
Let the scripts refresh automatically every 5 minutes.
# Note: installing under /opt/f2b-dashboard requires root privileges.
# Run as root, or prefix each command with sudo.
# Clone and prepare
$ sudo git clone https://github.com/a-lang/f2b-dashboard.git /opt/f2b-dashboard
$ cd /opt/f2b-dashboard
$ mkdir -p dashboard/data
$ chmod +x bin/f2b-parse.sh bin/f2b-geoip.sh
# Parse and enrich once
$ /opt/f2b-dashboard/bin/f2b-parse.sh /var/log/fail2ban.log /opt/f2b-dashboard/dashboard/data
$ /opt/f2b-dashboard/bin/f2b-geoip.sh /opt/f2b-dashboard/dashboard/data/dashboard.json /opt/f2b-dashboard/dashboard/data/geo-cache.json
# Add to cron (every 5 minutes)
$ crontab -e
*/5 * * * * /opt/f2b-dashboard/bin/f2b-parse.sh /var/log/fail2ban.log /opt/f2b-dashboard/dashboard/data && /opt/f2b-dashboard/bin/f2b-geoip.sh /opt/f2b-dashboard/dashboard/data/dashboard.json /opt/f2b-dashboard/dashboard/data/geo-cache.json
# Serve dashboard/ with any static server
$ python3 -m http.server 8080 --directory /opt/f2b-dashboard/dashboard