You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #10 from SubleXBle/development--improvements--0.3.2
🧱 New Blocklist Logic
🔁 Blocking an IP address now stores it in a jail-specific blocklist (blocklist["jailname"][]) instead of one global list.
🔍 Improves clarity and allows easier tracking of blocked IPs per jail as it is a step for better fail2ban integration.
📊 New Statistics
📅 The Fail2Ban stats panel now includes:
✅ Today’s bans & unbans (as before)
🕓 Yesterday
📈 Last 7 Days
📊 Last 30 Days
🧩 Per-Jail Blocklist Display
🧾 Each jail now displays its own blocklist section with:
🔒 Active bans
⏳ Pending entries
🔄 Auto-refresh every 60 seconds. for Jail-Stats
Copy file name to clipboardExpand all lines: README.md
+95-30Lines changed: 95 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Fail2Ban-Report
2
-
> Beta 3.1 | Version 0.3.1
2
+
> Beta 3.2 | Version 0.3.2
3
3
4
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
5
@@ -58,31 +58,83 @@ Fail2Ban-Report parses your fail2ban.log and generates JSON-based reports viewab
58
58
59
59
---
60
60
61
-
## 🆕 What's New in V 0.3.1
62
-
63
-
-**Protected access to JSON files**
64
-
- Direct access to `/archive/*.json` is now blocked via `.htaccess`
65
-
- Frontend scripts no longer request raw `.json` files directly
66
-
-**New secure PHP endpoints**
67
-
-`includes/get-json.php` and `includes/get-blocklist.php` act as controlled proxies to serve JSON data
68
-
- Only PHP scripts will now expose required JSON content
69
-
-**Hardened frontend behavior**
70
-
- JavaScript files (`jsonreader.js`, `blocklist-overlay.js`) fetch data only via the new PHP proxies
71
-
-**New Ministats in Header**
72
-
- Shows today's **ban/unban statistics** in the page header:
73
-
- 🚫 Bans
74
-
- 🟢 Unbans
75
-
- 📊 Total events
76
-
- Adds quick insight into current Fail2Ban activity
77
-
-**Mobile-Friendly**
78
-
- Site is now more mobile friendly
79
-
- added favicon (🕵️) to make browsers happy
80
-
81
-
82
-
🧪 [as promised there is an highly experimental feature for using fail2ban instead of UFW.](using-Fail2Ban-firewall-update.md) (⚠️ not recommended)
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
83
79
84
80
---
85
81
82
+
### ⚠️ Upgrade Notice
83
+
84
+
If you're upgrading from an existing installation:
85
+
86
+
- ⚠️ **The new blocklist format is not compatible with the old `blocklist.json`.**
87
+
- 🧹 To ensure a clean transition and avoid orphaned firewall entries, follow these steps:
88
+
89
+
1.**Empty your current blocklist** via the **Unblock** buttons in the UI.
90
+
2. 🔄 Trigger a **sync** using the `firewall-update.sh` to remove all Fail2Ban-Report-related rules from the firewall.
91
+
3. 🗑️ Delete the old `blocklist.json`.
92
+
4. 📦 Replace all files with the new version (overwrite).
93
+
5. ✅ Done! The new system will now build jail-specific blocklists automatically.
94
+
95
+
- 🛠️ _Optional_ : Run the `installer.sh` again to get a fresh setup.
96
+
97
+
> This ensures no leftover blocks remain in your firewall from the previous system.
98
+
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
+
135
+
---
136
+
137
+
86
138
## 📄 Changelog
87
139
88
140
Details about all new features, improvements, and changed files can be found in the [Changelog](changelog.md).
@@ -99,8 +151,9 @@ This is especially useful if you want to manually patch or update individual fil
99
151
- ✅ **Date filter** now correctly limits displayed events
100
152
- ✅ **Jail filter** now correctly shows only the jails present in the displayed event list.
101
153
- ✅ **File date filtering** fix to include today's JSON logs and ensure latest files are listed correctly.
102
-
- ✅ **Blocklist Path on unblocking** fixed a possible bug that could lead to not finding the blocklist.json.
103
-
→ Hotfixed on 05.08.2025 at 13:10 (UTC+2) directly in main
154
+
- ✅ **Blocklist Path on unblocking** fixed a possible bug that could lead to not finding the blocklist.json when unblocking from the Blocklist view.
155
+
→ Hotfixed on 05.08.2025 at 13:10 (UTC+2) directly in latest
156
+
=======
104
157
105
158
---
106
159
@@ -131,16 +184,23 @@ This is especially useful if you want to manually patch or update individual fil
131
184
- ⏳ Improve CSS and styling
132
185
133
186
## 👀 Outlook
134
-
- 🔭 next major version will focus on security by mooving archive/ out of webdirectory.
187
+
- 📦 The next major version will focus on security by mooving and restructuring the `archive/` folder layout.
188
+
- 🐳 A Docker image is expected probably around version v0.5.x, following the restructuring.
135
189
136
190
---
137
191
138
192
## 🖼️ Screenshots
139
193
140
-

141
-

142
-

143
-

194
+

195
+

196
+

197
+
198
+
---
199
+
200
+
## 🖥️ Demo
201
+
👀 Want to try out the look & feel?
202
+
There's a simple demo version available here – no backend, no real data:
203
+
👉 https://suble.net/ 🔗
144
204
145
205
---
146
206
@@ -157,6 +217,11 @@ Pull requests, feature ideas and bug reports are very welcome!
157
217
158
218
---
159
219
220
+
## 🧪 Experimental
221
+
- 🧪 [there is an highly experimental feature for using fail2ban instead of UFW.](using-Fail2Ban-firewall-update.md) (⚠️ not recommended)
0 commit comments