From 9a6f2a20edd0c76a8fd3b58280d038a0aa3eec12 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 19:53:26 +0000 Subject: make egress transparent: SNI proxy instead of squid The guests' DNS now resolves every name to 172.16.0.1, where nginx reads the server name from the TLS ClientHello and, if it's allowed, connects to port 443 of that name as resolved by the host. The guests need no proxy settings any more, and a faked server name can't get them to any other address. fc-egress keeps managing the list (now plain domains), and a reload regenerates nginx's map from it. --- default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index dcd337a..31af3c0 100644 --- a/default.nix +++ b/default.nix @@ -65,10 +65,9 @@ let networking.useDHCP = false; networking.resolvconf.enable = false; - # The way out is squid on the host, and DNS only says NXDOMAIN, see - # host.nix. + # The host resolves every name to itself and proxies TLS to allowed + # names, see host.nix. environment.etc."resolv.conf".text = "nameserver 172.16.0.1\n"; - networking.proxy.default = "http://172.16.0.1:3128"; systemd.network.enable = true; systemd.network.wait-online.enable = false; systemd.network.networks.eth = { -- cgit v1.3.1