aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-20 11:04:12 +0000
committertv <tv@krebsco.de>2026-11-20 11:04:12 +0000
commitc12cc5a78f0b4b153fbe71c2ea3d5ff06d8cde2d (patch)
tree751b7a4a86c65ac43526b4d11094663b719c6a9d /README.md
parenta623b0d5de4db7d484371ad5bc6af7d4a0a93aa6 (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 'README.md')
-rw-r--r--README.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/README.md b/README.md
index e2c809f..0c47dff 100644
--- a/README.md
+++ b/README.md
@@ -26,8 +26,8 @@ imports = [
```
`users` says who may run VMs, and how many at the same time: each gets
-that many tap devices. This sets up a bridge `fcbr0` (172.16.0.1/24)
-with the taps, DHCP and DNS for the guests, the egress proxy, and
+that many tap devices. This sets up a bridge `fcbr0` (172.16.0.1/24,
+and fdfc:fc::1/64) with the taps, DHCP and DNS for the guests, the egress proxy, and
nftables rules that keep the guests from reaching anything else, on the
host, beyond, or each other. Each tap has a fixed address, and the bridge
drops anything a guest sends from another, so the proxy knows whose a
@@ -37,6 +37,10 @@ Optional arguments:
- `proxyPort` (default 10443): where the proxy listens; the guests' port
443 gets redirected there.
+- `prefix6` (default `fdfc:fc::`): the guests' IPv6 /64. Each guest
+ gets the address from its MAC (SLAAC, from router advertisements by
+ the host's dnsmasq), for tcp:// and udp:// rules; HTTPS stays IPv4,
+ through the proxy.
- `denyDestinations`: addresses no whitelist can open, neither for
tcp:// and udp:// rules nor through the proxy, whatever a name resolves
to. Default: loopback, private, link-local, CGNAT, multicast and the
@@ -145,9 +149,11 @@ when the guest gets built, so build the guest on the host after the proxy
has started once. Everything else, and anything that isn't HTTPS, gets
refused.
-tcp:// and udp:// rules take IPv4 addresses or names. The guests
-resolve every name to the host, except the names in such rules: the host
-resolves those (IPv4) and tells the guests the same addresses, so
+tcp:// and udp:// rules take IPv4 addresses, IPv6 addresses in brackets
+(`tcp://[42::1]:22`, `udp://[42::/16]:5000-5100`; not port 443, HTTPS
+goes through the proxy, over IPv4), or names. The guests resolve every
+name to the host, except the names in such rules: the host resolves
+those (IPv4 and IPv6) and tells the guests the same addresses, so
`ssh git.example.org` works. They get resolved again every 5 minutes.
(Every guest gets those addresses for those names, but only the VMs
whose list has the rule can connect.) Those connections get forwarded, NATed to the host's address, and logged