Skip to content

Commit cfd8813

Browse files
authored
Beta 3.3
This is the final step before the major 0.4.0 update, which will move and restructure the archive/ directory outside of the web root. This release is tested/stable and delivers several new features, such as: - DoS / Scan / Brute-force "detection" with two thresholds (warning & critical) for bans per minute per jail - Fail2Ban log statistics for today, yesterday, last 7 days, and last 30 days - Multi-IP actions - Blocklist Statistics with pending state indicators - A more unified look for UI buttons, giving the interface a calmer, cleaner feel
2 parents 3fabd17 + e8d0815 commit cfd8813

29 files changed

+867
-442
lines changed

README.md

Lines changed: 82 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,58 @@
11
# Fail2Ban-Report
2-
> Beta 3.2 | Version 0.3.2
2+
> Beta 3.3 | Version 0.3.3
33
4-
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.
4+
> 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.
5+
6+
**Integration**
7+
>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.
8+
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).
59

610
🛡️ **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.
711

812
🔐 Security Notice
913

10-
> **Current Status:**
11-
Fail2Ban-Report currently manages bans and unbans via **UFW** as a safe **intermediate solution**.
12-
It does **not yet** directly modify Fail2Ban jails or existing fail2ban configurations.
14+
**Current Status:**
15+
> Fail2Ban-Report currently manages bans and unbans through **UFW**, serving as a safe **intermediate solution**.
16+
It does **not** directly modify Fail2Ban jails or change existing fail2ban configurations.
17+
18+
**Future Direction:**
19+
> A potential long-term enhancement could include **direct interaction with Fail2Ban jails** — for example, user-controlled bans and unbans per jail.
20+
The existing structured `*.blocklist.json` format is already designed to support this, ensuring that any future manual ban management can remain "persistent", reviewable, and fully auditable.
1321

14-
> **Future Direction:**
15-
The goal is to support **direct management of Fail2Ban jails** in upcoming versions — including user-controlled bans and unbans per jail.
16-
To ensure full control and auditability, all manual ban actions are already tracked in a structured `blocklist.json`, which will later serve as the trusted source for persistent and reviewable ban state.
17-
1822
Please read the [Installation Instructions](Setup-Instructions.md) carefully and secure your deployment with the provided `.htaccess`.
1923
> still a little experimental feature : Use the Installer ![Installer Setup Documentation](installer-setup.md) It would be great if you tell me if the installer worked for your needs.
2024
2125
---
2226

2327
## 📚 What It Does
24-
Fail2Ban-Report parses your fail2ban.log and generates JSON-based reports viewable via a web dashboard. It provides optional tools to:
28+
Fail2Ban-Report parses your `fail2ban.log` and generates JSON-based reports viewable via a responsive web dashboard.
29+
It provides optional tools to:
2530

26-
- Visualize ban and unban events
27-
- Interact with IPs (e.g., manually block or unblock)
28-
- Maintain a persistent blocklist.json
29-
- Sync that list with your system firewall using ufw (support for other firewalls or direct communication with Fail2Ban jails is not yet implemented)
31+
- 📊 Visualize **ban** and **unban** events, including per-jail statistics
32+
- ⚡ Interact with IPs (e.g., manually block, unblock, or report to external services)
33+
- 📂 Maintain **jail-specific** persistent blocklists (JSON) with `active` and `pending` status
34+
- 🔄 Sync those lists with your system firewall using **ufw**
35+
- 🚨 Show **warning indicators** when ban rates exceed configurable thresholds
3036

31-
## 🧱 Architecture overview:
37+
> **Note:** Direct integration with other firewalls or native Fail2Ban jail commands is not yet implemented.
38+
39+
---
3240

33-
- Backend Shell Scripts: Parse logs, generate JSON files, and update UFW rules based on blocklist.json
34-
- Frontend Web Interface: Visualizes data and offers action controls
35-
- JSON Blocklist: Stores manually blocked IPs marked with active=true
41+
## 🧱 Architecture Overview
42+
- **Backend Shell Scripts**:
43+
- Parse logs and generate daily JSON event files
44+
- Maintain and update `*.blocklist.json`
45+
- Apply or remove firewall rules based on blocklist entries (`ufw`)
46+
47+
- **Frontend Web Interface**:
48+
- Displays event timelines, statistics, and per-jail blocklists
49+
- Allows **multi-selection** for bulk ban/report actions
50+
- Shows **pending status** for unprocessed manual actions
51+
- Displays real-time warning indicators
52+
53+
- **JSON Blocklists**:
54+
- Stored per jail
55+
- Contain IP entries with metadata (`active`, `pending`, timestamps, jail name)
3656

3757
---
3858

@@ -58,32 +78,32 @@ Fail2Ban-Report parses your fail2ban.log and generates JSON-based reports viewab
5878
5979
---
6080

61-
## 🆕 What's New in V 0.3.2
62-
63-
### 🧱 New Blocklist Logic
64-
- 🔁 Blocking an IP address now stores it in a **jail-specific blocklist** (`blocklist["jailname"][]`) instead of one global list.
65-
- 🔍 Improves clarity and allows easier tracking of blocked IPs **per jail** as it is a step for better fail2ban integration.
66-
67-
### 📊 New Statistics
68-
- 📅 The Fail2Ban stats panel now includes:
69-
-**Today’s** bans & unbans (as before)
70-
- 🕓 **Yesterday**
71-
- 📈 **Last 7 Days**
72-
- 📊 **Last 30 Days**
73-
74-
### 🧩 Per-Jail Blocklist Display
75-
- 🧾 Each jail now displays its own **blocklist section** with:
76-
- 🔒 Active bans
77-
- ⏳ Pending entries
78-
- 🔄 Auto-refresh every **60 seconds**. for Jail-Stats
81+
## 🆕 What's New in V 0.3.3 (QoL Update)
82+
### ⚠️ Warning System and Pending Status Indicators
83+
- 🚨 New [Warnings] section in .config to configure warning & critical thresholds (events per minute per jail) in format warning:critical (e.g: 20:50).
84+
- 👀 warning & critical status indicators (colored dots) in the header for quick overview.
85+
- ⏳ Manual block/unblock actions now mark IPs as pending until processed by firewall-update.
86+
- 📊 Pending entries are now visible in blocklist stats for better tracking.
87+
88+
### ✔️ Multi-Selection UI and Bulk Actions for Ban & Report
89+
- ✅ Switched from per-row action buttons to checkbox multi-selection for IPs.
90+
- 📋 New dedicated “Ban” and “Info” buttons for bulk processing.
91+
- 🔄 Frontend updated to handle and display results for multiple IP actions simultaneously.
92+
- 🔔 New notification system for success/info/error messages on each action.
93+
94+
### 🛠 Backend Improvements & New IP Reporting
95+
- 🔄 Backend now accept arrays of IPs for ban and report actions, with detailed aggregated feedback.
96+
- 🆕 Added IPInfo API integration alongside AbuseIPDB for richer geolocation and network info.
97+
- ⏲️ Built-in delay between report requests to avoid API rate limits.
98+
- ⚙️ Improved error handling and user feedback for multi-IP operations.
7999

80100
---
81101

82102
### ⚠️ Upgrade Notice
83103

84-
If you're upgrading from an existing installation:
104+
If you're upgrading from an existing installation : pre 0.3.2 and also from 0.3.2
85105

86-
- ⚠️ **The new blocklist format is not compatible with the old `blocklist.json`.**
106+
- ⚠️ **The new blocklist format is not compatible with the old `blocklist.json`.** and got new field `pending` is in json since 0.3.3
87107
- 🧹 To ensure a clean transition and avoid orphaned firewall entries, follow these steps:
88108

89109
1. **Empty your current blocklist** via the **Unblock** buttons in the UI.
@@ -96,42 +116,6 @@ If you're upgrading from an existing installation:
96116

97117
> This ensures no leftover blocks remain in your firewall from the previous system.
98118
99-
100-
### 🔄 Updated and Added Files in v0.3.2
101-
102-
#### 🗂️ Backend (PHP / Shell)
103-
104-
- `includes/block-ip.php`
105-
→ Refactored to support jail-specific blocklists
106-
107-
- `includes/unblock-ip.php`
108-
→ Now handles unblocking from jail-based lists
109-
110-
- `includes/list-files.php`
111-
→ Modified to read multiple jail-specific blocklists
112-
113-
- `includes/footer.php`
114-
→ Includes references to new JS files
115-
116-
- `includes/fail2ban-logstats.php`
117-
→ Extended to calculate aggregate statistics (Today, Yesterday, Last 7/30 Days)
118-
119-
- `firewall-update.sh`
120-
→ Now processes `blocklist.json` with jail-based structure:
121-
`{ "sshd": [...], "apache-auth": [...] }`
122-
123-
- `assets/css/style.css`
124-
→ added the new stuff (i know it is still a mess)
125-
126-
127-
#### 🆕 New Files (JS)
128-
129-
- `assets/js/blocklist-stats.js`
130-
→ Displays per-jail "Active" and "Pending" IP statistics
131-
132-
- `assets/js/fail2ban-logstats.js`
133-
→ Displays time-based event statistics
134-
135119
---
136120

137121

@@ -153,7 +137,7 @@ This is especially useful if you want to manually patch or update individual fil
153137
-**File date filtering** fix to include today's JSON logs and ensure latest files are listed correctly.
154138
-**Blocklist Path on unblocking** fixed a possible bug that could lead to not finding the blocklist.json when unblocking from the Blocklist view.
155139
→ Hotfixed on 05.08.2025 at 13:10 (UTC+2) directly in latest
156-
=======
140+
-**Installer** should now ask if you want to delete and reclone repo when allready existing
157141

158142
---
159143

@@ -168,15 +152,16 @@ This is especially useful if you want to manually patch or update individual fil
168152
### 🔐 Security
169153
- ✅ Hardened `.htaccess` with best practices
170154
- ✅ add security layer between json and js
171-
- 🧩 moove `archive/` out of webdirectory
155+
- 🧩 move `archive/` out of webdirectory
172156
- ⏳ Further improvements (ongoing goal)
173157

174158
### 🔥 Active Defense
175159
- ✅ Manual IP blocking via UI in UFW
176160
- ✅ IP reputation lookup via AbuseIPDB
161+
- ✅ Bulk blocking of multiple IPs
162+
- ✅ Shows warnings/critical states threshold for Bans/Minute/Jail (setable in config)
177163
- 🧩 Support for nftables, firewalld
178164
- 🧩 full integration with fail2ban jails for block/unblock actions
179-
- ⏳ Bulk blocking of multiple IPs
180165
- ⏳ Optional automatic blocking based on patterns or thresholds
181166
- ⏳ Integration with external services (e.g. AbuseIPDB reporting)
182167

@@ -191,9 +176,10 @@ This is especially useful if you want to manually patch or update individual fil
191176

192177
## 🖼️ Screenshots
193178

194-
![Main interface with log overview](assets/images/Main-List-032.png)
195-
![Blocklist interface with unblock actions](assets/images/Block-List-032.png)
196-
![Result after banning an IP](assets/images/Message-Toast-032.png)
179+
![Main interface with log overview](assets/images/Main-List-033.png)
180+
![Blocklist interface with unblock actions](assets/images/Block-List-033.png)
181+
![Result after banning an IP](assets/images/Message-Toast-033.png)
182+
![Result after Info](assets/images/Info-Msg-033.png)
197183

198184
---
199185

@@ -204,6 +190,22 @@ There's a simple demo version available here – no backend, no real data:
204190

205191
---
206192

193+
## ✅ What It Is
194+
- A **read-only + action-enabled** web dashboard for Fail2Ban events
195+
- A tool to **visualize** bans/unbans and **manually** manage blocked IPs
196+
- A **log parser + JSON generator** that works alongside your existing Fail2Ban setup
197+
- A way to **sync a persistent blocklist** with your firewall (currently **UFW only**)
198+
- Designed for **sysadmins** who want quick insights without SSH-ing into the server
199+
200+
## ❌ What It Is Not
201+
- ❌ A replacement for **Fail2Ban** itself (it depends on Fail2Ban)
202+
- ❌ A real-time IDS/IPS (data updates depend on log parsing intervals)
203+
- ❌ A universal firewall manager (no native support for iptables/nftables, etc. — yet)
204+
- ❌ A tool for **automatic** jail management (manual actions only for now)
205+
- ❌ A heavy analytics platform — it’s lightweight and log-driven by design
206+
207+
---
208+
207209
## 🤝 Contributing
208210

209211
Pull requests, feature ideas and bug reports are very welcome!
@@ -217,10 +219,6 @@ Pull requests, feature ideas and bug reports are very welcome!
217219
218220
---
219221

220-
## 🧪 Experimental
221-
- 🧪 [there is an highly experimental feature for using fail2ban instead of UFW.](using-Fail2Ban-firewall-update.md) (⚠️ not recommended)
222-
223-
---
224222

225223
## 📄 License
226224

0 commit comments

Comments
 (0)