From 83cd94d9d6320abadffcd72fb5cdda6178a867bb Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 8 Oct 2023 12:09:31 +0900 Subject: [PATCH] Test --- nixos/hosts/osaka-vultr-01/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/osaka-vultr-01/default.nix b/nixos/hosts/osaka-vultr-01/default.nix index a6a7ef0c..0685ae6e 100644 --- a/nixos/hosts/osaka-vultr-01/default.nix +++ b/nixos/hosts/osaka-vultr-01/default.nix @@ -35,9 +35,6 @@ sopsFile = ../../../secrets/wireguard.yaml; }; - networking.nat.enable = true; - networking.nat.externalInterface = "eno3"; - networking.nat.internalInterfaces = [ "wireguard0" ]; # Wireguard Forwarder boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; }; networking.firewall.allowPing = true; @@ -71,4 +68,17 @@ }; }; }; + + networking.nat = { + enable = true; + externalInterface = "eno3"; + internalInterface = "wireguard0"; + forwardPorts = [ + { + destination = "10.100.0.2:80"; + proto = "tcp"; + sourcePort = 80; + } + ]; + }; } \ No newline at end of file