diff options
| author | tv <tv@krebsco.de> | 2026-11-16 19:53:26 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 20:57:42 +0100 |
| commit | 9a6f2a20edd0c76a8fd3b58280d038a0aa3eec12 (patch) | |
| tree | 56649bd2cc2b0db811022fb9a9e347e1d92e11b3 /default.nix | |
| parent | 37194b5e9f2420e9abde5aa4088c91a1df319a41 (diff) | |
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.
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 5 |
1 files changed, 2 insertions, 3 deletions
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 = { |
