From f503574016bc651c93d78e2430011eefbed2a106 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 8 Oct 2023 13:22:54 +0900 Subject: [PATCH] TEst --- nixos/hosts/osaka-vultr-01/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/hosts/osaka-vultr-01/default.nix b/nixos/hosts/osaka-vultr-01/default.nix index 50465bdb..48fb1437 100644 --- a/nixos/hosts/osaka-vultr-01/default.nix +++ b/nixos/hosts/osaka-vultr-01/default.nix @@ -45,8 +45,8 @@ ips = [ "10.100.0.1/24" ]; listenPort = 51820; privateKeyFile = "/run/secrets/wireguard_keys/osaka-vultr-01"; - postSetup = ''${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE''; - postShutdown = ''${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE''; + # postSetup = ''${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE''; + # postShutdown = ''${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE''; peers = [ { # nixos-rpi4-03 publicKey = "trHvfNtQ7HKMiJjxEXo2Iubq5G6egjx7gHiBlDmJ5Ek="; @@ -61,9 +61,9 @@ networking.nat = { enable = true; - externalInterface = "eno3"; internalInterfaces = [ "wireguard0" ]; - internalIPs = [ "10.100.0.0/24" ]; + externalInterface = "eno3"; + # extraCommands = ''iptables -t nat -A nixos-nat-post -d ${container.localAdress} --dport 80 -j SNAT --to-source ${container.hostAdress}''; forwardPorts = [ { sourcePort = 80; destination = "10.100.0.2:80"; } { sourcePort = 443; destination = "10.100.0.2:443"; }