diff options
author | lassulus <git@lassul.us> | 2023-09-03 11:58:42 +0200 |
---|---|---|
committer | lassulus <git@lassul.us> | 2023-09-03 11:58:42 +0200 |
commit | 77b8c837c5e9a5217e829ae2976a37e691a291b5 (patch) | |
tree | a37ff3bf5cb299ce7c4910dfb787076acbef452b | |
parent | ba79c70bbdd357e9c97306beeb181645bad03219 (diff) |
l coms proxy: ipforward ports
-rw-r--r-- | lass/2configs/services/coms/proxy.nix | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lass/2configs/services/coms/proxy.nix b/lass/2configs/services/coms/proxy.nix index e8555f9b7..fd7b36ca8 100644 --- a/lass/2configs/services/coms/proxy.nix +++ b/lass/2configs/services/coms/proxy.nix @@ -21,14 +21,13 @@ in proxy_pass ${target}:${toString port}; } '') tcpports} - ${lib.concatMapStringsSep "\n" (port: '' - server { - listen ${toString port} udp; - proxy_pass ${target}:${toString port}; - } - '') udpports} ''; + krebs.iptables.tables.nat.PREROUTING.rules = lib.flatten (map (port: [ + { predicate = "-p udp --dport ${toString port}"; target = "DNAT --to-destination ${config.krebs.hosts.orange.nets.retiolum.ip4.addr}:${toString port}"; v6 = false; } + { predicate = "-p udp --dport ${toString port}"; target = "DNAT --to-destination [${config.krebs.hosts.orange.nets.retiolum.ip6.addr}]:${toString port}"; v4 = false; } + ]) udpports); + services.nginx.virtualHosts."jitsi.lassul.us" = { enableACME = true; acmeFallbackHost = "${target}"; @@ -36,7 +35,7 @@ in locations."/" = { recommendedProxySettings = true; proxyWebsockets = true; - proxyPass = "http://${target}"; + proxyPass = "https://${target}"; }; }; } |