Optional HE IPv6 Ingress and Internet Egress Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [x]) syntax for tracking.
Goal: Add default-off HE tunnel termination, Proxmox incoming TCP DNAT and effective internet_egress_ports-controlled outgoing TCP/UDP/ICMP SNAT through one shared public IPv6, preserving incoming client addresses and existing IPv4/local DNS behavior.
Architecture: Host-config owns the SIT tunnel, dummy-interface public VIP, forwarding/routes and independent host INPUT guard. Home derives per-slot ULA /64 networks for the union of incoming-forwarding targets and guests with effective global/per-guest/role internet egress, and manages scoped nftables DNAT/SNAT/forwarding/conntrack cleanup. Both roots consume one shared he_ipv6 switch; incoming traffic preserves client identity, and permitted outgoing flows use the shared VIP as source.
Tech Stack: Terraform, bpg/proxmox 0.118.1, neuspaces/system 0.5.0 in both roots, existing pve-firewall backend, Linux iproute2/sysctl/systemd/nftables/conntrack-tools, POSIX shell, Terraform mock-provider tests, Node.js >=22 subprocess tests, Docusaurus.
Spec: Optional HE IPv6 ingress and internet egress.
Status: implementation complete and verified offline on 2026-11-06; live acceptance and deployment remain operator-owned. This includes the latest requirement for IPv6 internet egress through the existing effective TCP/UDP/ICMP permissions. A fresh builder check of the egress additions reported no important unresolved questions. Repository implementation is authorized; live deployment remains operator-owned.
Global Constraints
- Terraform >= 1.10 and < 2.0 in home; >= 1.9 and < 2.0 in reusable modules and host-config.
- Keep bpg/proxmox 0.118.1, neuspaces/system 0.5.0, lukaspustina/pihole 0.3.1 and magodo/restful 0.25.2.
- HE IPv6 defaults off; use the same shared var-file for both Terraform roots.
- One public /128 on Proxmox; isolated ULA /64 per ingress or effective-egress guest, derived from its slot; gateway offset 1, guest offset 2.
- Incoming TCP uses destination NAT and preserves client IPv6 sources; permitted outgoing TCP/UDP/ICMP uses explicit SNAT to the shared VIP.
- Reuse effective global/per-guest/role internet_egress_ports for IPv6; keep protected networks blocked and IPv4 behavior unchanged.
- Keep local DNS IPv4-only; do not edit modules/dns_records or publish public DNS.
- No live apply, automatic guest/network restart, router change or old-tunnel access.
- Preserve all pre-existing checkout changes and private tfvars; stage only this feature's own changes.
- Keep the established pve-firewall backend and existing IPv4 resource identities; never flush global rules or conntrack.
Review Focus
- Off/default/omitted shared file after deployment: restore guest IPv6 denial, remove owned ULA/NAT/tunnel/VIP state and preserve IPv4 (Tasks 1-6).
- Owned file/subnet repair or repeated apply: reconcile once, retain unchanged sessions/mappings, then converge (Tasks 2, 3, 5, 6).
- Changed/removed ingress or egress permission with established conntrack: revoke immediately, purge only affected guest/protocol/port tuples, retain unchanged inherited grants, and keep a blocking guard on failure (Tasks 5, 6).
- Public VIP exists while home is absent/disabled or node firewall ownership is false: no Proxmox management/listener exposure (Tasks 2, 6).
- Effective global/per-guest/role egress and ICMPv6/legacy firewall zones: provision egress-only guests, allow correct return traffic, block protected destinations/control spoofing and preserve incoming client addresses (Tasks 1, 3-7).
File Structure and Fixed Interfaces
- Both roots:
he_ipv6 = object({ enabled = optional(bool, false), server_ipv4 = optional(string), local_ipv4 = optional(string), client_ipv6 = optional(string), server_ipv6 = optional(string), routed_prefix = optional(string), ula_prefix = optional(string), mtu = optional(number, 1480), protected_cidrs = optional(list(string), []), port_forwards = optional(map(object({ guest = string, port = number })), {}) }), default{}, non-nullable. There is noingress_guestfield. modules/proxmox_host.he_ipv6: nullable settings object using the root's validated tunnel/prefix/MTU fields, default null; host-config projects enabled settings to it and ignores guest map resolution. Host outputs/status use the spec's exact property names.platform_network.networks: addipv6_cidr = optional(string)to existing{ slot, vnet_id }entries.guest_network.ipv6_cidrdefaults null. Itsipv6output is null or{ cidr, gateway, address }; platform, service_vm and vm carry the same nullablenetwork.ipv6object.- service_vm/vm:
ipv6_forwarded_ports = list(number)andprotected_ipv6_cidrs = list(string), both default[]. Mapped ports are TCP only and must be a subset of declared TCP public_ports. Reuse existing effectiveinternet_egress_ports = list(object({ protocol = string, port = optional(number) }))for IPv6 TCP/UDP and portless ICMPv6 too; no new egress input/flag. Existing IPv4 behavior and IPv4-only connections/allow_rules/DNS/NTP/guest role dependencies remain unchanged. - New
modules/ipv6_ingress: inputpublic_address = string,ula_prefix = string,protected_cidrs = list(string)(default[]),forwards = map(object({ guest = string, port = number, address = string, vnet_id = string })), andegress = map(object({ address = string, vnet_id = string, ports = list(object({ protocol = string, port = optional(number) })) })). Tunnel interface fixedhsp-he6, routed NAT zone fixed 0. Exact participating firewall bridges use zone 1, derived through optionalfirewall_bridges = map(string)(bridge name to assigned ULA), default{}. Instantiate when HE is enabled and EITHER map is nonempty, including egress-only configurations. It requires the system provider and returnsgeneration. Derive egress map from the SAME effective global/per-guest/role list used by service_vm; omit empty entries. - New home outputs:
ipv6_ingressnull or{ public_address, routed_prefix, ula_prefix };ipv6_networksmap of all ingress/egress participants to{ vnet_id, cidr, gateway, address };ipv6_port_forwardsmap keyed like configuration to{ public_address, protocol, port, guest, target_address, vnet_id };ipv6_egressmap of egress-enabled guests to{ public_address, source_address, vnet_id, ports }, with the effective configured-protocol list and null ICMP port;ipv6_host_requirementslist of{ purpose, direction, iface, source, destination, protocol, icmp_type }, nullable selectors. Maps/lists empty off; port-forward protocol istcp. - Host-config
he_ipv6_status: null or{ interface, vip_interface, public_address, local_ipv4, remote_ipv4, local_ipv6, remote_ipv6, ula_prefix, mtu, route_metric }. Outputs describe desired state, not tunnel health or applied external filtering.
Before Execution
- Obtain review of the revised spec/plan before product implementation; read the selected execution skill and
superpowers:using-git-worktrees. Preserve the pre-existing uncommitted IPv4 ICMP work in whichever checkout is used. - Record
git status --short, Terraform/Node versions and baselinemake check. Tests are mock, fake-command or loopback-only. Do not SSH to live infrastructure during repository implementation.
Task 1: Define the shared switch, forwarding declarations and validation
Files: Create environments/{home,host-config}/ipv6.tf, environments/he-ipv6.tfvars.example, and environments/{home,host-config}/tests/ipv6.tftest.hcl. Update home variables.tf SSH-required description/validation as needed, preserving current edits.
Interfaces: Produces the exact shared schema above, computed public offset-2 VIP, null-safe enabled settings and blocking target/port/slot validation. Do not wire unimplemented child inputs yet.
- Step 1: Write validation tests. Defaults/off need no endpoints, SSH or targets. Enabled fixture uses the spec's HE addresses, ULA
fd42:77:1::/48, public proxy slot 2/VNethsp1002with declared TCP 80/443, and HTTP/HTTPS forwarding entries. Assert public address2001:470:1f15:4d6::2; empty forwarding map is valid with or without effective egress. Disabled populated settings tolerate absent former targets. Egress-only guests need no public_ports. - Step 2: Add rejection runs. Common matrix: missing/null fields, wrong address families, multiline/shell syntax, wrong/noncanonical/overlapping prefixes, invalid ULA /48, equal tunnel endpoints/server outside client /64, MTUs 1279/1481/fractional, malformed/null forwarding entries, duplicate external ports and forbidden/invalid ports. Home adds missing target, ANY ingress/egress participant slot >65535, target port absent from TCP public_ports (including UDP-only), protected/private roles rejected by their existing public_ports validation, missing SSH and mismatched local IPv4. Existing internet_egress_ports validation still rejects TCP/UDP without ports and ICMP with a numeric port. Use blocking expect_failures, not warning-only checks.
- Step 3: Run both root IPv6 suites and capture initial failure. Commands:
terraform -chdir=environments/home test -filter=tests/ipv6.tftest.hcl -no-colorand the host-config equivalent. Expected initially: missing schema/validation. - Step 4: Implement root configuration/validation and disabled example. Both roots use the same schema/common constraints. Only home resolves inventory and SSH. The portable example uses documentation addresses and forwards only an existing public proxy; future mail lines are commented. Add SAME-var-file comments to both commands; do not write private configuration.
- Step 5: Re-run both suites. Expect valid enabled/empty/off cases and intentional invalid failures. No infrastructure resources or SSH calls are added by disabled schema alone.
Task 2: Persist tunnel, public host VIP, routes and independent host guard
Files: Create modules/proxmox_host/ipv6.tf, modules/proxmox_host/templates/he-ipv6.sh.tftpl, modules/proxmox_host/tests/ipv6.tftest.hcl, tests/he-ipv6-routing.test.mjs. Wire host-config main.tf/ipv6.tf; add the Node test to Makefile.
Interfaces: Owns hsp-he6 SIT, hsp-vip6 dummy, public /128, metric-42761 default/blackhole routes, ip6 hsp_he_host INPUT table, sysctl/helper/unit files and counted system_service_systemd.he_ipv6. Helper actions start|reload|stop; status fields as above. It has no dependency on guest VNet existence/home state.
- Step 1: Write mock lifecycle tests. Enabled renders actual tunnel/VIP/ULA/MTU settings and safe host guard; off creates zero HE files/services. Assert no VIP /64 or public address on a guest bridge, correct blackhole/default routes, forwarding persistence, service enabled/started and no guest/network restart or new pve-guests dependency. Replace a file and assert one reload generation; unchanged apply converges; enabled -> off retains existing IPv4 service.
- Step 2: Write rendered-helper behavior tests. Extract ACTUAL
system_filehelper content from verbose Terraform mock plan JSON; execute in POSIX sh with fake ip/sysctl/nft commands, isolated PATH/runtime state and hard rejection of unexpected commands. Assert INPUT guard precedes VIP/tunnel activation; unmapped VIP/tunnel/ULA host application traffic stays denied; owned addresses/routes reconcile; partial failures fail closed; name/table/route collisions never alter foreign state. Repeated stop is safe and withdraws VIP/transport before guard deletion. Include missing/replaced interfaces and configuration-file repair. - Step 3: Run
terraform -chdir=modules/proxmox_host test -filter=tests/ipv6.tftest.hcl -no-colorandnode --test tests/he-ipv6-routing.test.mjs; record red evidence. Missing resources/helper or guard lifecycle should cause failure. - Step 4: Implement root-owned helper/unit/sysctl and scoped nft transactions. Use only validated values and ownership manifests, no eval/global flush. Arrange SIT/dummy availability and network-online/pve-firewall ordering. Install host guard before addresses and start forwarding safely. Cleanup preserves unrelated routes/tables and does not reset global forwarding. Persist prior owned settings so repaired/changed input cannot orphan old state. Refuse uncoordinated routed/ULA-prefix migration while enabled; document disable cycle. Wire config and file repair to convergence generation.
- Step 5: Re-run new and existing host-routing suites. Validate rendered shell with
sh -n, inspect start/cleanup order and verify disabled status null. Fake commands must be the only networking commands executed. Linux nft syntax/packet behavior remains an operator acceptance check.
Task 3: Allocate isolated ULA /64 networks to ingress and egress guests
Files: Modify modules/{platform_network,guest_network}/main.tf and home ipv6.tf/main.tf. Create corresponding module tests/ipv6.tftest.hcl; extend existing reconciliation tests as necessary.
Interfaces: Home computes participants as forwarding targets UNION guests with nonempty effective global/per-guest/role egress, then cidrsubnet(ula_prefix, 16, slot). Modules return nullable IPv6 networks. Add separate counted proxmox_sdn_subnet.ipv6; retain IPv4 this and centralized SDN applier. Refactor the existing effective egress expression into one shared home local if necessary; do not implement different inheritance for IPv6.
- Step 1: Write address tests. Slot 2 gives
fd42:77:1:2::/64, gateway::1, guest::2; slot 16 givesfd42:77:1:10::/64; IPv4 slot 2 remains10.77.0.8/30/.9/.10. Forward-only, egress-only and combined guests each get ONE isolated subnet. A guest with neither gets null. Global UDP 123 selects every guest; empty per-guest list still inherits it; monitoring receives its TCP 80/443 defaults. Adding/removing/reordering permissions must not renumber guests. Public HE /64 is assigned to no guest. Reject malformed/non-ULA/noncanonical/non-/64 input and duplicate subnet assignments. - Step 2: Write SDN lifecycle tests. Native IPv6 subnet has
snat = falsebecause source translation belongs to the owned edge table; IPv4 stays true. Forced subnet repair changes apply generation once and then converges. Removing the last forward RETAINS ULA if effective egress remains; removing final egress RETAINS ULA if a forward remains. Only losing both removes IPv6 and triggers centralized apply, retaining the IPv4 VNet/subnet. - Step 3: Run new guest_network/platform_network test filters and capture red failures. Expected: missing optional schema/resource/output or wrong address derivation.
- Step 4: Implement nullable ULA plumbing, per-slot allocation and repair/removal tracking. Do not allocate based on map order. Preserve IPv4 identities and avoid repeated/null-only SDN reapplication. Keep routing/gateway management with native SDN and use no shared guest bridge, VLAN or public /64 guest subnet.
- Step 5: Run new and existing addressing/zone/reconciliation suites. Expect exact addresses, same guest allocation when adding/removing/reordering unrelated forwards, correct repair/removal, and converged applies.
Task 4: Initialize VM/LXC ULA addresses and constrain guest IPv6 policy
Files: Modify modules/service_vm/main.tf, modules/vm/{variables,main,container,policy}.tf; create modules/vm/ipv6.tf and modules/vm/tests/ipv6.tftest.hcl. Preserve current IPv4 ICMP work.
Interfaces: Nullable network.ipv6; ipv6_forwarded_ports and protected_ipv6_cidrs lists, default empty. Existing output.rules and firewall ownership remain. Mapped TCP ports must also exist in declared TCP public_ports.
- Step 1: Write VM/LXC plan tests. Render static ULA /64/gateway for either ingress or egress participants, preserve IPv4/net0 and correct vm_id/container_id endpoints. Egress-only guests have no public_ports or mapped ingress acceptance. Reject inconsistent subnet/offsets and undeclared mapped ports. Source set contains assigned IPv4/ULA plus
::for DAD, never a whole ULA prefix; disabled state retains the IPv4-only entry and two IPv6 denies. - Step 2: Write policy assertions. Keep DHCP/automatic NDP/radv false. Assert local NS/NA/DAD, required ICMPv6 errors 1/2/3/4, unspecified-source drop, explicit nonlocal NDP/RA/RS/redirect exclusions and protected ranges before public/egress allowances. TCP 443 and UDP 123 grant exactly those IPv6 destination ports; portless icmp maps to portless icmpv6 while router-control/protected denials still win. Replies to outgoing ping are stateful; no incoming ping is auto-opened. Empty effective egress gives no new IPv6 internet initiation even with ingress; egress never creates incoming public ports. Existing IPv4 rules and IPv4-only guest dependencies remain unchanged. Restore IPv6 denial only when there is no IPv6 network or HE is off.
- Step 3: Run
terraform -chdir=modules/vm test -filter=tests/ipv6.tftest.hcl -no-colorand capture red evidence. Confirm the pinned provider's real schema supports the ICMPv6 type selector throughproto/stringdport; do not invent anicmp_typeprovider field. - Step 4: Implement nullable initialization, source sets and IPv6 policy. Pass ULA aggregate, public/tunnel prefixes and protected extras through service_vm. Only mapped TCP ports get IPv6 incoming application acceptance; reuse the EXISTING effective internet_egress_ports for outgoing TCP/UDP/ICMPv6 after protected/control denials. Keep required protocol errors/NDP independent. Replies are stateful; unconfigured outgoing traffic and lateral/protected initiation remain denied. Ordinary HTTP backend connections stay IPv4.
- Step 5: Re-run new and existing policy/LXC tests. Expect green without losing current optional-port IPv4 ICMP tests. Record effective compiled filter, template link-local and DAD as required live checks.
Task 5: Manage host DNAT/SNAT, forwarding and scoped conntrack revocation
Files: Create modules/ipv6_ingress/{main,variables,outputs,versions}.tf, modules/ipv6_ingress/templates/ingress.sh.tftpl, modules/ipv6_ingress/templates/ingress.nft.tftpl, modules/ipv6_ingress/tests/ingress.tftest.hcl, and tests/ipv6-ingress.test.mjs. Add the module/test to Makefile init/check; use system provider 0.5.0.
Interfaces: Inputs in Fixed Interfaces, including effective egress map; owns ONLY ip6 hsp_he_ingress, helper/unit/files and runtime manifest. Helper actions start|reload|stop; output generation. Incoming TCP port is preserved; outgoing source is SNATed to fixed VIP; public /128 is never assigned here. No masquerade, NAT64, incoming client-source rewrite or IPv4 mutation.
- Step 1: Write exact provider-plan NAT tests. Fixture DNATs VIP TCP 80/443 to proxy ULA and TCP 25 to mail-fixture ULA; a third egress-only guest permits TCP 443, UDP 123 and portless icmp. Assert narrow HE/VIP incoming matching, exact ULA/VNet outgoing matching, protected/control exclusions before egress allows, SNAT to fixed VIP only for permitted guest-initiated flows via HE, and correct original-tuple/return/related-ICMP handling in BOTH directions. No incoming source rewrite, masquerade, NAT64, IPv4 mutation/global flush, broad ULA egress or inbound acceptance for egress-only guests. Test forwards-empty/egress-present and the inverse.
- Step 2: Write rendered-helper fake-command tests. Initial/atomic installation; no-op/reordered effective permissions preserve sessions; removed/remapped ingress blocks then purges only original-VIP/TCP-port entries. Revoking TCP/UDP egress purges only affected original-ULA/protocol/original-destination-port flows with translated VIP in zone 0; ICMPv6 revocation has no numeric port selector. Keep other guests, ports, protocols and retained global/role grants. Stop blocks traffic then purges owned DNAT AND SNAT TCP/UDP/ICMPv6 entries before table removal. Empty entries are benign. Cleanup failure retains blocking guard/error; invalid nft keeps last safe state; foreign state/conflicting zones survive untouched. No full conntrack flush or host-guard deletion.
- Step 3: Run
terraform -chdir=modules/ipv6_ingress test -filter=tests/ingress.tftest.hcl -no-colorandnode --test tests/ipv6-ingress.test.mjs; capture red failures. Initialize pinned providers offline/from cache as needed, never contact live SSH. - Step 4: Implement the shared edge module, helpers and unit. Preflight nft/conntrack/zone 0; reject conflicts rather than changing all bridge zones. Generate scoped DNAT, fixed-VIP SNAT and current-permission forwarding/return guards from validated maps. Persist old effective permissions for semantic diff/revocation of both directions, using original conntrack tuples and protocol-specific selectors. Preserve unchanged flows on repair/reorder/no-op; block before targeted purge, retain safe guards on failure. Never SNAT inbound client packets or apply a general source-aggregate internet accept. Require no guest proxy daemon.
- Step 5: Run targeted suites and inspect generated artifacts. Shell syntax green; mock/fake tests demonstrate correct command/state transitions. Do not call fake tests proof of conntrack/NAT behavior on Linux. Add an explicit operator
nft --check/effective-rule check before live cutover.
Task 6: Wire home SSH ingress, outputs, node policy and two-root lifecycle
Files: Modify environments/home/{ipv6,main,policy,outputs,versions}.tf, environments/home/.terraform.lock.hcl, home/host-config IPv6 tests and existing inventory tests as needed. Leave DNS module/tests unchanged.
Interfaces: Consumes Tasks 1-5. Home reuses one effective global/per-guest/role egress local for service_vm, participant selection, edge rules and outputs. Declare system provider alias using current SSH conventions; instantiate edge when enabled and either forwards/egress is nonempty, after SDN/guest firewalls. Never own host-config's table/VIP/tunnel.
- Step 1: Write root integration tests. Exercise ingress-only, egress-only and combined VM/LXC guests; global UDP123 inheritance despite empty guest lists; merged/deduplicated per-guest TCP443 and icmp; monitoring TCP80/443 role defaults; empty forwarding map WITH egress; both maps empty; HE off with configured egress still IPv4-only. Assert exact IPv6 networks, NAT maps and ipv6_egress output. Preserve existing output shapes/A targets; no local AAAA or automatic mail guest. Egress-only guests get no incoming public allowance. No active NAT/SSH action for fresh off or both-maps-empty configurations.
- Step 2: Test ownership and transitions. manage_host_firewall false creates no node-rules owner while independent guards remain; true adds only narrow acceptance to existing owner. Last forward removal retains ULA/NAT module while egress remains, and last egress removal retains ingress-only networking. Only losing BOTH removes the guest IPv6 subnet; global off removes all HE networking and both-direction translations, empties/nulls outputs and retains IPv4. Unchanged/inherited effective grants must not be revoked accidentally. Repeated apply converges; neither root reads the other's state.
- Step 3: Run both root IPv6 suites and capture red evidence. Missing provider/input wiring, outputs or lifecycle conditions should fail before implementation.
- Step 4: Implement provider/module wiring and outputs. Add only pinned system 0.5.0 to home requirements/lockfile without broad upgrades. Avoid a provider configuration that makes disabled users require SSH or accidentally operate on localhost. Preserve the sole Proxmox node-firewall owner; output acceptance needs when unmanaged. Depend ingress activation on completed SDN/guest firewall resources, with safe stop before resource teardown. Do not couple IPv4 guest startup to HE health or take over full node firewall ownership.
- Step 5: Run both roots and
make check. Include new module/helpers. Inspect verbose plans for host-only public /128, ingress/egress participant ULA initialization, TCP-only public forwards, effective TCP/UDP/ICMPv6 outgoing rules, narrowly scoped SNAT/return traffic, denied unconfigured/protected traffic and unchanged local DNS. All tests remain offline/mock/loopback.
Task 7: Document DNAT cutover, applications, acceptance and rollback
Files: Create docs/ipv6.md; modify README.md, docs/{deployment,firewall-roles,verification}.md, docs/chapters/{deployment,firewall,verification}.md, website/sidebars.js, and example var-files as necessary. Link the revised spec/plan in engineering records.
Interfaces: Uses exact schema/output names; produces a usable default-off guide for the chosen host-DNAT topology, not a TCP-proxy tutorial.
- Step 1: Document topology, dependencies and both directions. Separate tunnel-link/VIP/ULA, stable slots/blackhole, incoming DNAT/client identity and outgoing explicit SNAT/shared public source. Explain existing global/per-guest/role internet_egress_ports applies to IPv6 too, including portless icmp -> icmpv6, control/protected exclusions, and egress-only participants. Note global UDP123 gives every guest IPv6 when HE is on; no separate egress toggle. Explain nft/conntrack prerequisites, legacy backend coexistence, public_ports prerequisites and no automatic mail allocation. Shared example stays disabled/documentation-addressed.
- Step 2: Document exact ordered two-root commands. Both plans use
-var-file=../he-ipv6.tfvars, alongside existing private vars and home-parallelism=1. Prepare/review plans, user stops old endpoint BEFORE enabled host apply, apply host-config then home, verify listeners/OS addresses, user moves protocol-41 NAT, test then publish public AAAA. Disable DNS/TTL, switch false, home teardown/purge first, host teardown second, user removes NAT. Retain SSH settings until teardown finishes: no SSH is needed for a fresh off configuration, but destroying deployed resources requires it. Prefix/slot topology migration uses full disable/reconfigure/enable. Reverse cutover only after stopping the new endpoint. Never restart pve-guests. - Step 3: Document application, firewall and DNS boundaries. Applications listen on ULA/use its gateway; HTTPS backends remain IPv4 while mail TLS/client IP uses DNAT. Outgoing IPv6 SMTP works when its destination port and HE policy permit it; public VIP reverse DNS/SPF/reputation remain operator responsibilities. No PROXY requirement. Explain independent host guard/additional unmanaged acceptance, source-shared egress, no incoming listener opened by egress, fixed DNS/NTP transport unchanged, IPv4-only local DNS and operator-owned public AAAA/MX. Exclude LAN/VPN IPv6 hairpin ingress.
- Step 4: Write live acceptance matrix. Check nft/compiled rules and zone0 on both directions/firewall bridges. Test public HTTPS/ready mail and original incoming client address; from an EGRESS-ONLY guest test allowed TCP, UDP and ping -6 with replies, shared public SNAT source, blocked undeclared ports/protected/ULA/host destinations, and no incoming listener or general ICMP-control bypass. Test global/per-guest/role grants, translated related ICMPv6/PMTU and large transfers. Deny host access at VIP/tunnel/ULA gateways plus cross-guest/spoof/RA/redirect/unmapped ingress. Remove active ingress and TCP/UDP/ICMP egress grants, verify only affected sessions die, test cleanup failure guards, firewall reload/reboots and global-off with IPv4 retained. Mocks/fakes are not packet tests.
- Step 5: Run final checks and document actual evidence.
make check,make docs-build,git diff --check. Verify example fields/relative links. Record results in verification docs and explicitly label live tests not performed; diagnose new failures without attributing pre-existing issues to this feature. - Step 6: Review feature against spec before completion. Use requesting-code-review/verification-before-completion skills, inspect the full feature diff alongside the baseline, fix actionable findings and rerun affected checks. Stage/commit only scoped changes if the selected workflow calls for commits; do not absorb unrelated ICMP edits. Report actual implementation/test results and remaining manual NAT/DNS/application actions without claiming deployment.
Self-Review and Handoff
Spec coverage: configuration (1), guarded tunnel/VIP ownership (2), private guest routing (3), guest filtering (4), DNAT/SNAT/conntrack lifecycle (5), root integration/outputs (6), operator cutover/verification (7). Review Focus items have explicit tests in their owning tasks plus real Linux acceptance where mocks cannot demonstrate behavior. Keep schemas/output names fixed across boundaries. IPv6 internet egress is explicitly included through the existing effective permissions. No TCP-proxy task, public guest-address assignment or local DNS task remains.
The user approved this plan on 2026-11-05. Native execution completed the seven tasks and a fresh whole-feature review. The two Important review findings (failed teardown retries and rejected permission reductions) were reproduced by failing tests and fixed. Final evidence: ten validated Terraform configurations, 244 native test runs, 23 Node tests, documentation build and Git whitespace checks. Live Linux acceptance and cutover remain operator-owned.
Final-review implementation amendment: modules/ssh_cleanup provides only the two destroy-time SSH agent gates needed to rerun idempotent cleanup for failed or inactive systemd units before deleting helpers. Root mock tests override the entire cleanup module; no live SSH destroy is part of offline evidence. See the spec's Terraform ownership section for the narrowly scoped exception to the original no-new-provisioners constraint.
Correction after operator deployment (2026-11-06)
The operator's capture identifies the missing SNAT effect after legacy firewall-bridge traversal. Keep provider versions and native rule-list ownership unchanged. Exact owned firewall bridges now use pre-tracking zone 1, with routed/NAT tracking in zone 0. Migrate broken bindings and revoke affected tuples under a blocking guard; preserve other guests and unchanged sessions. Add root, renderer and real-helper subprocess regressions for these contracts.
The operator rejected a proposed Perl/security-group workaround and chose
to retain typed-rule UI warnings. Remove that mechanism completely. Only
portless native ICMP uses ipv6-icmp; do not rename typed legacy rules
without provider support for icmp-type. No new Perl helpers remain.
No apply, merge or push; do not run local VMs or containers.