diff options
| author | tv <tv@krebsco.de> | 2026-11-20 11:04:12 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-20 11:04:12 +0000 |
| commit | c12cc5a78f0b4b153fbe71c2ea3d5ff06d8cde2d (patch) | |
| tree | 751b7a4a86c65ac43526b4d11094663b719c6a9d /pkgs/run-firecracker-vm | |
| parent | a623b0d5de4db7d484371ad5bc6af7d4a0a93aa6 (diff) | |
host: IPv6 for the guests' tcp:// and udp:// rules
The guests get IPv6: fcbr0 has fdfc:fc::1/64 (module argument prefix6),
the host's dnsmasq sends router advertisements, and each guest takes the
address from its MAC (SLAAC with EUI-64; the guest's networkd is set up
for that, without privacy addresses), so the host knows each tap's
address, as with IPv4.
The rules take IPv6 addresses in brackets, tcp://[42::1]:22 or
udp://[42::/16]:5000-5100, and names now resolve to both families (and
get AAAA records for the guests). Forwarded connections get NATed to
the host's address, like IPv4. Like IPv4 everything else is refused:
the bridge only lets a tap send from its own addresses (or :: for
duplicate address detection), the host only answers neighbour and router
discovery, denyDestinations and the per-guest limits apply. HTTPS stays
IPv4, through the proxy: IPv6 port 443 is refused.
Diffstat (limited to 'pkgs/run-firecracker-vm')
| -rw-r--r-- | pkgs/run-firecracker-vm/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/run-firecracker-vm/default.nix b/pkgs/run-firecracker-vm/default.nix index 855b43c..6df6222 100644 --- a/pkgs/run-firecracker-vm/default.nix +++ b/pkgs/run-firecracker-vm/default.nix @@ -217,6 +217,12 @@ let # The default client identifier is derived from the machine-id, # which is the same in every VM, so they'd all get the same lease. dhcpV4Config.ClientIdentifier = "mac"; + # IPv6: the address from the MAC, which the host expects (see + # modules/host), and DNS stays the host's IPv4 address. + networkConfig.IPv6AcceptRA = true; + networkConfig.IPv6PrivacyExtensions = "no"; + ipv6AcceptRAConfig.Token = "eui64"; + ipv6AcceptRAConfig.UseDNS = false; }; boot.bcache.enable = false; |
