Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb983799cd | |||
| d3f564d66f |
@@ -1 +1 @@
|
||||
v0.9.17
|
||||
v0.9.18
|
||||
|
||||
@@ -52,6 +52,8 @@ The main landing page after login. Shows recent ban activity at a glance.
|
||||
- Last 7 days (week)
|
||||
- Last 30 days (month)
|
||||
- Last 365 days (year)
|
||||
- **Data source selection:** The "Last 24 hours" preset queries fail2ban's live database directly for real-time accuracy. All longer presets (7 days, 30 days, 365 days) query the BanGUI long-term archive, because fail2ban's own database only retains the last 24 hours by default.
|
||||
- A **data-source badge** next to the time-range selector indicates whether the current view is showing **Live (fail2ban DB)** or **Archive (BanGUI DB)** data.
|
||||
|
||||
---
|
||||
|
||||
@@ -70,14 +72,16 @@ A geographical overview of ban activity.
|
||||
- Colors are smoothly interpolated between the thresholds (e.g., 35 bans shows a yellow-green blend)
|
||||
- The color threshold values are configurable through the application settings
|
||||
- **Interactive zoom and pan:** Users can zoom in/out using mouse wheel or touch gestures, and pan by clicking and dragging. This allows detailed inspection of densely-affected regions. Zoom controls (zoom in, zoom out, reset view) are provided as overlay buttons in the top-right corner.
|
||||
- For every country that has bans, the total count is displayed centred inside that country's borders in the selected time range.
|
||||
- Countries with zero banned IPs show no number and no label — they remain blank and transparent.
|
||||
- For every country that has bans, the total count is shown only in the country tooltip, not rendered on the map itself.
|
||||
- Countries with zero banned IPs show no tooltip and remain blank and transparent.
|
||||
- Clicking a country filters the companion table below to show only bans from that country.
|
||||
- Time-range selector with the same quick presets:
|
||||
- Last 24 hours
|
||||
- Last 7 days
|
||||
- Last 30 days
|
||||
- Last 365 days
|
||||
- **Data source selection:** Same rule as the Dashboard — "Last 24 hours" uses the live fail2ban database; all other ranges use the BanGUI archive.
|
||||
- A **data-source badge** is displayed alongside the time-range selector indicating **Live (fail2ban DB)** or **Archive (BanGUI DB)**.
|
||||
|
||||
---
|
||||
|
||||
@@ -245,13 +249,15 @@ A page to inspect and modify the fail2ban configuration without leaving the web
|
||||
|
||||
## 7. Ban History
|
||||
|
||||
A view for exploring historical ban data stored in the fail2ban database.
|
||||
A view for exploring historical ban data stored in the BanGUI long-term archive.
|
||||
|
||||
### History Table
|
||||
|
||||
- Browse all past bans across all jails, not just the currently active ones.
|
||||
- **Columns:** Time of ban, IP address, jail, ban duration, ban count (how many times this IP was banned), country.
|
||||
- Filter by jail, by IP address, or by time range.
|
||||
- The default time range on first load is **Last 7 days** and the data source is always the **BanGUI archive**, ensuring the full retention window is visible regardless of fail2ban's `dbpurgeage` setting.
|
||||
- A **data-source badge** is displayed indicating **Archive (BanGUI DB)**.
|
||||
- See at a glance which IPs are repeat offenders (high ban count).
|
||||
|
||||
### Per-IP History
|
||||
@@ -265,7 +271,7 @@ A view for exploring historical ban data stored in the fail2ban database.
|
||||
- On each configured sync cycle (default every 5 minutes), BanGUI reads latest entries from fail2ban `bans` table and appends any new events to BanGUI history storage.
|
||||
- Supports both `ban` and `unban` events; audit record includes: `timestamp`, `ip`, `jail`, `action`, `duration`, `origin` (manual, auto, blocklist, etc.), `failures`, `matches`, and optional `country` / `ASN` enrichment.
|
||||
- Includes incremental import logic with dedupe: using unique constraint on (ip, jail, action, timeofban) to prevent duplication across sync cycles.
|
||||
- Provides backfill mode for initial startup: import last N days (configurable, default 7 days) of existing fail2ban history into BanGUI to avoid dark gaps after restart.
|
||||
- Provides backfill mode for initial startup: import the last 7.5 days of existing fail2ban history into BanGUI to avoid dark gaps after restart. Requires fail2ban's `dbpurgeage` to be set to at least `648000` (7.5 days) — BanGUI ships with this value pre-configured in its Docker setup.
|
||||
- Includes configurable archive purge policy in BanGUI (default 365 days), separate from fail2ban `dbpurgeage`, to keep app storage bounded while preserving audit data.
|
||||
- Expose API endpoints for querying persistent history, with filters for timeframe, jail, origin, IP, and current ban status.
|
||||
- On fail2ban connectivity failure, BanGUI continues serving historical data; next successful sync resumes ingestion without data loss.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "bangui-frontend",
|
||||
"private": true,
|
||||
"version": "0.9.17",
|
||||
"version": "0.9.18",
|
||||
"description": "BanGUI frontend — fail2ban web management interface",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -410,17 +410,6 @@ export function WorldMap({
|
||||
setTooltip(null);
|
||||
}}
|
||||
/>
|
||||
{count > 0 && isCentroidValid && (
|
||||
<text
|
||||
x={cx}
|
||||
y={cy}
|
||||
textAnchor="middle"
|
||||
dominantBaseline="central"
|
||||
className={styles.countLabel}
|
||||
>
|
||||
{count}
|
||||
</text>
|
||||
)}
|
||||
</g>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import { useState } from "react";
|
||||
import { Badge, Text, makeStyles, tokens } from "@fluentui/react-components";
|
||||
import { Text, makeStyles, tokens } from "@fluentui/react-components";
|
||||
import { BanTable } from "../components/BanTable";
|
||||
import { BanTrendChart } from "../components/BanTrendChart";
|
||||
import { ChartStateWrapper } from "../components/ChartStateWrapper";
|
||||
@@ -95,9 +95,6 @@ export function DashboardPage(): React.JSX.Element {
|
||||
originFilter={originFilter}
|
||||
onOriginFilterChange={setOriginFilter}
|
||||
/>
|
||||
<Badge appearance="filled" color={source === "archive" ? "brand" : "success"}>
|
||||
{source === "archive" ? "Archive (BanGUI DB)" : "Live (fail2ban DB)"}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{/* ------------------------------------------------------------------ */}
|
||||
|
||||
@@ -402,8 +402,6 @@ export function HistoryPage(): React.JSX.Element {
|
||||
const { items, total, page, loading, error, setPage, refresh } =
|
||||
useHistory(appliedQuery);
|
||||
|
||||
const sourceLabel = "Archive (BanGUI DB)";
|
||||
|
||||
useEffect((): void => {
|
||||
const nextQuery: HistoryQuery = {
|
||||
range,
|
||||
@@ -490,27 +488,7 @@ export function HistoryPage(): React.JSX.Element {
|
||||
setIpFilter(value);
|
||||
}}
|
||||
/>
|
||||
<Badge appearance="filled" color="brand" style={{ alignSelf: "flex-start" }}>
|
||||
{sourceLabel}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
{/* Error / loading state */}
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
{error && (
|
||||
<MessageBar intent="error">
|
||||
<MessageBarBody>{error}</MessageBarBody>
|
||||
</MessageBar>
|
||||
)}
|
||||
|
||||
{loading && !error && (
|
||||
<div
|
||||
style={{ display: "flex", justifyContent: "center", padding: tokens.spacingVerticalXL }}
|
||||
>
|
||||
<Spinner label="Loading history…" />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
{/* Summary */}
|
||||
|
||||
@@ -165,9 +165,6 @@ export function MapPage(): React.JSX.Element {
|
||||
setSelectedCountry(null);
|
||||
}}
|
||||
/>
|
||||
<Badge appearance="filled" color={source === "archive" ? "brand" : "success"}>
|
||||
{source === "archive" ? "Archive (BanGUI DB)" : "Live (fail2ban DB)"}
|
||||
</Badge>
|
||||
<Button
|
||||
icon={<ArrowCounterclockwiseRegular />}
|
||||
onClick={(): void => {
|
||||
|
||||
Reference in New Issue
Block a user