Close public DNS under the airgap seal and mirror the verify control image

The caproni control pulled an alpine tag the mirror never held, and the seal left the metadata resolver answering public names.

One AIRGAP_CONTROL_IMAGE that airgap-mirror pulls and the control runs. On every host airgap-dns.sh runs dnsmasq (no-resolv, server=/internal/) on 127.0.0.1, masks systemd-resolved, and rejects port 53 to the metadata resolver (IPv4 and IPv6) in its own nft table for everyone but dnsmasq.

flowchart LR
  S[seal] --> H[hold table at boot]
  H --> A[apply: dnsmasq plus reject]
  A --> Q{lookup}
  Q -- .internal --> M[metadata resolver]
  Q -- public --> X[fails]
  U[unseal] --> R[originals restored exactly]

Resolves under the seal: names under .internal (metadata.google.internal, the instance FQDN, other VMs), the pinned lab host in /etc/hosts. Public names fail. Pods on caproni lose *.internal; accepted.

airgap-unseal always reopens DNS. AIRGAP_DNS_OPEN=1 applies to seal only. Suspend and down --keep-snapshot leave firewall and DNS both open; restore re-seals DNS only if the firewall seal stood, never touching the firewall; a snapshot without dnsmasq records DNS open and fails. up preinstalls dnsmasq, disabled. A second seal never overwrites saved originals; resolved stays masked while sealed.

Live on Fedora, caproni and AlmaLinux 9: sealed, rebooted, probed; with the reject removed the probe reads NOT_SEALED.

Closes #66 Closes #67

Edited by Andrew Dunn

Merge request reports

Loading
Loading