Repository navigation
ProBAN 0.1.5 — demo mode, large-table dashboard fixes, and enforcement that can't freeze detection
Engine resilience — a slow or failing pfctl can no longer freeze detection
Each maintenance cycle used to run inside a single transaction that committed only after the pf-table enforcement step. If a pfctl call stalled or errored — a firewall contending under heavy load, or another product holding the pf tables — the whole cycle rolled back, including the firewall-log read offset and any newly recorded offenders. The engine then re-read the same log lines every cycle and the offender count never climbed, with no error surfaced. (Dry-run returns before pfctl, so its cycle committed — which is why "switch to dry-run and it updates" looked like a detection fix.)
Detection and decay are now committed before enforcement, and enforcement is best-effort per table: a failing pfctl is caught, the cycle is reported DEGRADED with the reason recorded, and the next cycle re-reconciles the tables (enforcement is declarative and idempotent, so nothing is lost by deferring it). A new "Firewall enforcement degraded" dashboard banner makes the condition visible instead of a silent stall. Verified on OPNsense 26.7 / FreeBSD 15.1 with pfctl fault-injection. Thanks to @remixs22 for the report that surfaced it. (#11)
Dashboard — usable on firewalls with tens of thousands of offenders (#8, #9, #10)
- The offenders list is hard-capped at 500 rows per request (the old 10,000 ceiling and the "All" page-size button are gone; a saved "All" preference migrates to the default). Paging through the full table is unaffected. (#8)
- The per-offender hits modal now explains aged-out event history instead of showing a blank table — an offender row is kept for
offender_amnesia_days, but the per-hit events prune afterevent_retention_days, so a long-dormant source keeps its lifetime hit count with no event detail left to show. (#10) - New time-source setting (Settings → Housekeeping → "Show times in"): render every timestamp in browser time (default) or the firewall's own zone, with an indicator of which clock is active. (#9)
- "Blocked until" column hint clarifying it is the wall-clock expiry after ban decay (≈2× the current "Ban" value at the default decay rate), and that the rate is tunable. (#10)
Engine — one malformed row can't stall the pass
The decay pass now tolerates a NULL last_calc/blackhole_until (e.g. a manual DB edit or partial import) and processes each offender independently, so a single bad row is logged and skipped instead of aborting decay and enforcement for every offender.
Added — demo mode
An off-by-default switch (Settings → Housekeeping → "Demo mode") that, once enabled, lets you populate the dashboard with synthetic offenders — and purge them again — straight from the UI, so paging, column sorting, the 500-row page-size cap, the "Active blocks" stat, and the per-offender hits modal can be exercised before real traffic rolls in. Guard-railed: enabling it requires acknowledging a modal, each seed asks a second confirmation, seeding is refused server-side unless demo mode is on (not merely hidden), every synthetic row stays in the non-routable 198.18.0.0/15 block, and one purge removes exactly what was added. A matching dev CLI (tools/seed_offenders.py) shares the same core so the seeded schema can't drift from the engine's.
No dependencies — runs on the Python 3 that ships with OPNsense (standard library only).