box/host
dan-claude-bot b429f5b65c feat(setup-host): refuse a claimed subnet, and BOX_SUBNET to move off one (#80)
Run inside a box, setup-host built a nested boxnet claiming the exact
subnet and gateway of the guest's own uplink: the guest then held
10.88.0.1 as a LOCAL address while its default route pointed at 10.88.0.1
as its GATEWAY, carried two connected routes for the subnet, and suffered
intermittent, self-recovering egress blackouts (~24-36 s, roughly hourly)
that no host-side check could attribute. The flagship use case funnels
agents toward exactly this — working on box, in a box — so the guard, not
the operator, has to catch it.

setup-host now scans the target subnet BEFORE any mutation: the default
route's gateway inside it (the smoking gun — that is this machine's own
uplink), or any non-boxnet interface holding an address in it, refuses
with the way out named (BOX_SUBNET). A prior boxnet owning the subnet is
the one claimant that is NOT a collision — the legitimate re-run — and an
existing bridge on a DIFFERENT subnet refuses too: setup-host converges a
bridge, it never re-addresses one under live leases.

BOX_SUBNET=<a.b.c.0/24> (validated at the gate, alongside BOX_DNS) moves
the whole stack from one place:
  · the bridge address derives (ipv4.address=<gw>/24)
  · the ACL's gateway carve-out derives — and the ruleset is now converged
    via 'network acl edit', not created once: the #80 escape hatch (moving
    the bridge) left the old /32 behind, stranding box DNS inside the
    10.0.0.0/8 drop, which presents as a dead resolver, never as a stale
    ACL
  · box-firewall reads the gateway off the live bridge ('|| true' because
    under pipefail an absent bridge would kill the script instead of
    answering "no bridge yet")
  · the drill, multiuser rehearsal and migrate-host probes derive the
    prefix from 'incus network get boxnet ipv4.address' instead of
    hardcoding 10.88 — a BOX_SUBNET host must not fail its own rehearsals

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 19:46:58 +00:00
..
box-firewall.service Give box-firewall.service RemainAfterExit so its state means something 2026-07-17 14:05:23 +00:00
box-firewall.sh feat(setup-host): refuse a claimed subnet, and BOX_SUBNET to move off one (#80) 2026-07-18 19:46:58 +00:00
grant-user.sh feat: box export / import — state that survives the box and the host (#70) 2026-07-18 18:55:23 +00:00
migrate-host.sh feat(setup-host): refuse a claimed subnet, and BOX_SUBNET to move off one (#80) 2026-07-18 19:46:58 +00:00
revoke-user.sh fix(revoke): purge re-checks the incus-user state dir — as root, not as a hopeful stat 2026-07-18 16:01:57 +00:00
setup-host.sh feat(setup-host): refuse a claimed subnet, and BOX_SUBNET to move off one (#80) 2026-07-18 19:46:58 +00:00
teardown-host.sh feat(cli): versions, use, uninstall — the install managed from the CLI, absence-asserted 2026-07-18 16:01:57 +00:00