Skip to content

Releases

ProBAN 0.1.7

Choose a tag to compare

@github-actions github-actions released this 04 Dec 04:54
v0.1.7
872f1c7

Fix: engine stuck on "PF counters unavailable" (#13)

If ProBAN's pf tables went missing, the engine could get stuck. The dashboard kept showing "PF counters unavailable … returned non-zero exit status 255", bans stopped expiring, and restarting the service or the firewall didn't clear it.

ProBAN now recovers on its own. A missing table counts as empty. If a table ProBAN counts blocked packets on is missing or has lost its counters, ProBAN asks OPNsense to reload the firewall ruleset. That puts the table back as defined and keeps the banned addresses. The reload is rate-limited.

The "PF counters unavailable" message on the dashboard now also includes pfctl's own error text.

Update from System → Firmware → Updates (or Plugins) if you've set up the ProBAN package repository. Otherwise, see the 0.1.6 notes for the one-time setup.

Full details in the changelog.

ProBAN 0.1.6

Choose a tag to compare

@github-actions github-actions released this 19 Nov 20:02
v0.1.6
d9ed27a

Install and update ProBAN from the OPNsense firmware page

ProBAN now has its own signed package repository. Add it once, and os-proban shows up under System → Firmware → Plugins like any other plugin. After that, new versions arrive through OPNsense's normal update check: no rebuilding, no reinstalling.

From the firewall's shell (console option 8, or SSH):

mkdir -p /usr/local/etc/pkg/keys
fetch -o /usr/local/etc/pkg/keys/proban.pub https://freeflite.github.io/PROBan/proban.pub
fetch -o /usr/local/etc/pkg/repos/ProBAN.conf https://freeflite.github.io/PROBan/ProBAN.conf

Then go to System → Firmware → Plugins, refresh, and install os-proban. OPNsense only installs plugins on an up-to-date firewall, so update OPNsense first if it asks.

Every package is signed, and pkg refuses anything that doesn't verify against proban.pub. The package attached to this release carries a GitHub build-provenance attestation (gh attestation verify os-proban-0.1.6.pkg --repo Freeflite/PROBan).

Already running ProBAN?

Installs built from source before this release are named os-proban-devel, which OPNsense hides from the Plugins list. Switch once: in System → Firmware → Plugins, remove os-proban-devel, then install os-proban. Your settings and offender history are kept.

Other changes

  • Updates take effect immediately. Installing or upgrading the package now restarts the ProBAN engine (when it's enabled). Before, the old version kept running until the next reboot.
  • Dashboard times default to firewall time, so they match the rest of OPNsense. Browser time is still under Settings → Housekeeping → "Show times in", and a saved choice is kept. Browsers that report UTC for privacy (LibreWolf, Firefox with fingerprinting resistance) show UTC in browser-time mode. (#9)
  • One package for every OPNsense release. ProBAN has no compiled code, so a single package installs on OPNsense 26.1 (FreeBSD 14) and 26.7 (FreeBSD 15).

Full details in the changelog.


No dependencies: runs on the Python 3 that ships with OPNsense (standard library only).

ProBAN 0.1.5 — demo mode, large-table dashboard fixes, and enforcement that can't freeze detection

Choose a tag to compare

@Freeflite Freeflite released this 16 Nov 18:23
v0.1.5
7223236

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 after event_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).

ProBAN 0.1.4 — reliable firewall-log ingestion from boot

Choose a tag to compare

@Freeflite Freeflite released this 08 Nov 21:35
v0.1.4
66fbc2c

Fixed — reliable firewall-log ingestion from boot

The engine could go blind (ingested fw=0) for up to an hour after a reboot, and briefly after each daily log rotation.

Root cause: ProBAN's default firewall-log path, /var/log/filter/latest.log, is a symlink OPNsense only (re)creates from its hourly syslog archive cron job. So right after boot — and briefly after a rotation — that symlink doesn't exist even though the filter log is actively being written. The engine's plain open() hit FileNotFoundError and ingested nothing the whole window: no detections, no bans, no escalation.

Fix: the reader now falls back to the newest filter_*.log in the same directory — the exact file latest.log would point at, matching OPNsense's own log_archive and firewall-log viewer (read_log.py, which uses tail -F). The dated file and the symlink share an inode, so offset/rotation tracking stays seamless when the symlink later appears: no missed bytes, no double-counting. The engine's file watcher follows the resolved file too, so responsiveness is unchanged.

Reproduced and fixed on a live OPNsense 26.7 box: a freshly rebooted appliance with no latest.log now detects and escalates attack traffic immediately, with no manual intervention.

Resolves #7, and is the root cause behind the "only updates when I change a setting" reports in #4 and #8. Adds resolve_log unit tests.

Note: if you were on 0.1.3 and saw ProBAN sitting at ingested fw=0 / offenders not updating, this is the fix — no config change needed.

ProBAN 0.1.3

Choose a tag to compare

@Freeflite Freeflite released this 06 Nov 21:01
v0.1.3
b7f9f0c

Most of this release comes from @brotaxt (DominicKo) via their fork at https://github.com/brotaxt/PROBan — thank you. Merged with their authorship intact and validated end-to-end on OPNsense 26.7.

Fixed

  • Service failed to start on OPNsense 26.7 (configd exit status 126) — the rc.d launcher shipped non-executable once the plugin build stopped force-setting script modes. Scripts are now committed executable. (#2, #3)
  • Offender log / levels stopped updating in drop (enforcing) mode once an IP was blocked. The engine now polls pf packet counters, so a blocked offender keeps escalating from the traffic pf drops for it — no firewall-log spam required. (#4)

Added

  • Persistent, kqueue-driven engine daemon (replaces the run-once engine + sleep supervisor), with bounded, log-rotation-aware ingestion.
  • Optional, independently toggleable detections: UDP probes, TCP scans (NULL/FIN/XMAS), TCP-invalid flag combos, port scans, and IPv6 source-rotation.
  • pf packet-counter polling, batched pfctl table syncs with timeouts, Suricata alert prioritisation, and a much larger engine test suite.

Full notes in CHANGELOG.md.