From 24e979d6bda47060817a600aa5c62fe1d29c78dc Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 27 Aug 2022 19:06:39 +0200 Subject: [PATCH] nixos-module/container/upstream: use internal core ipv4 address for port forwarding reflection --- nix/nixos-module/container/upstream.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nix/nixos-module/container/upstream.nix b/nix/nixos-module/container/upstream.nix index 15dcebb..91b509f 100644 --- a/nix/nixos-module/container/upstream.nix +++ b/nix/nixos-module/container/upstream.nix @@ -108,11 +108,7 @@ in else "${destination}:${toString sourcePort}"; loopbackIPs = if reflect - then builtins.filter (ip: ip != null) ( - map (net: - upstreamInterfaces.${net}.upstream.staticIpv4Address - ) (builtins.attrNames upstreamInterfaces) - ) + then [ config.site.net.core.hosts4.${hostName} ] else []; } ) hostConf.forwardPorts;