Date: 2026-09-11
Accepted (implemented in 0.22.0, issue #84)
Islandr's nftables table is built from the database and applied at startup. It is not persisted anywhere: a reboot clears it, and FirewallBootstrap puts it back when the service comes up. That is fine while the service comes up.
It is not fine when it does not. The failure modes are documented and real — a hub with too little memory is OOM-killed mid-startup with no stack trace (docs/install.md), and a failed Flyway migration leaves a schema the binary refuses. With Restart=on-failure, RestartSec=10 and StartLimitBurst=5, systemd gives up after about a minute and the unit stays failed. Meanwhile wg-quick@<iface> brings the interface up regardless: Before= is satisfied when Islandr's start job finishes, and a failed start counts as finished.
What the hub then looks like: the tunnel is live, carrying exactly the peers written in <iface>.conf — the ones Islandr never imported, by ADR-0030 — and no nftables table exists, so the kernel's own FORWARD policy (accept, with nothing else loaded) lets them route anywhere the hub can reach. Islandr's own peers are absent entirely. This is the worst shape a failure can take here: the VPN appears to work for some users, so nobody investigates, while access control is simply not running. Tracked as R-192.
The ordering added in 0.21.0 narrows the normal-boot window but does not close it either, and for a second reason: the unit has no Type=, so it is Type=simple and systemd considers Islandr started the moment the process is forked — not when the ruleset is applied. A native image wins that race in practice, but a race is not a guarantee.
Install a second, minimal nftables table that exists from boot and is removed by Islandr only once its own table is live.
islandr-boot-firewall.service, RemainAfterExit=yes, Before=wg-quick@<iface>.service — loads /etc/islandr/boot.nft before the tunnel comes up.table inet islandr-boot with one forward chain: everything that neither enters nor leaves the WireGuard interface is accepted (so the host's other forwarding — Docker, a second interface — is untouched), and everything else is dropped. It is generated by setup-hub.sh with the configured interface name, like the unit's ordering line.FirewallBootstrap deletes inet islandr-boot after its own table has been applied successfully, never before, so there is no moment with neither. That needs one more sudoers line, nft delete table inet islandr-boot, matching the shape ADR-0011 already uses./etc/nftables.conf is deliberately not touched. An admin may keep their own ruleset there, and appending to it would reintroduce exactly the two-writer problem ADR-0030 avoids for the WireGuard config. Islandr ships its own unit and its own file.
This supersedes the need for a readiness gate. With a table present from boot, it no longer matters that Type=simple marks Islandr started early: traffic is dropped until Islandr's own table replaces the boot one. No unauthenticated readiness endpoint and no ExecStartPost poll are needed.
The trade this accepts: a hub whose Islandr does not start after a reboot forwards nothing at all, where today it would at least carry the peers from the config file. For an access-control product that is the right direction — "the control plane is down, so traffic stops" is defensible; "the control plane is down, so everyone may do anything" is not — but it is an availability decision and is recorded as one, not slipped in as a side effect of a bug fix.
Baseline: A — boot-time table, removed by Islandr after its own is applied (the proposal).
| Criterion (weight) | A: boot table (baseline) | B: readiness gate only (ExecStartPost + readiness endpoint) |
C: Requisite=islandr.service on wg-quick |
D: accept R-192, document it |
|---|---|---|---|---|
| Covers "Islandr never starts" (5) | +1 (the table is there with no service running) | −1 (nothing applies a table; the tunnel still comes up) | +1 (the tunnel does not come up at all) | −1 (uncovered by definition) |
Covers the Type=simple race on a normal boot (4) |
+1 (a table exists before the interface, whoever wins) | +1 (that is exactly what it fixes) | +1 (ordering is a hard dependency) | −1 |
| Availability of unrelated traffic (4) | +1 (only WireGuard forwarding is dropped; the host's other forwarding is untouched) | +1 (nothing is blocked) | −1 (no tunnel at all, including peers that never had anything to do with Islandr; a routine islandr restart risks bouncing it depending on the dependency chosen) |
+1 |
| Leaves the admin's files alone (4) | +1 (own unit, own file; /etc/nftables.conf untouched) |
+1 | 0 (a drop-in on a unit Islandr does not own) | +1 |
| Diagnosability of the failure (3) | 0 (peers connect but nothing routes — needs the "boot table still active" state surfaced, which the enforcement banner can carry) | +1 (nothing changes) | +1 (unambiguous: the VPN is down) | −1 (the failure is invisible — that is the point of R-192) |
| Privilege footprint (3) | −1 (one more sudoers line and a root oneshot unit) | −1 (a new unauthenticated HTTP endpoint, small but a new surface) | +1 (none) | +1 (none) |
| Complexity (2) | −1 (a second table, a handover, and a state where both could exist) | 0 | +1 | +1 |
Weighted: A = +19, B = +2, C = +15, D = +1.
C scores close and is genuinely simpler — but it takes the whole tunnel down for every peer, including site gateways whose traffic Islandr may not even govern, and it couples the tunnel's lifecycle to a service that gets restarted on every update. A keeps the tunnel up and drops only what Islandr would have been filtering anyway. B is worth doing only if A is rejected; A makes it redundant.
islandr-boot fails, both tables are live and both forward hooks run — a drop in either wins, so every granted flow stays blocked. The deletion has to be part of the same apply path, logged at error level and reflected in the enforcement status rather than left silent (R-194)./etc/sudoers.d/islandr, widening the allowlist by a single fixed command against a table Islandr did not create.setup-hub.sh grows a second unit and a generated .nft file; the uninstall instructions grow two lines. Existing installs do not get any of it from an update — same as the 0.21.0 ordering change.Built as decided, with two details worth recording:
RulesetService attempts the removal after every successful apply while the boot table is still standing, so an admin who activates enforcement, or who fixes whatever made the removal fail, gets the handover on their next change rather than on the next reboot. Once done it is not retried, so the steady state costs no nft calls.removeBootTable() defaults to "unsupported" on the NftablesAdapter interface. The boot table is installed by setup-hub.sh, which is the native systemd install; the socket-proxy runtime (ADR-0012) has no such unit and would need its own proxy op, so it reports "nothing to hand over" rather than a failure.The state is exposed as a bootTable block on GET /api/v1/enforcement/status and rendered as its own banner — separate from the enforcement banner, because it fires while enforcement is otherwise healthy (R-193, R-194).