From 30bc4bf2df67ce0e52a8e85ddd8e4e98921b35a8 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 8 Oct 2023 16:32:20 +0900 Subject: [PATCH] Test --- nixos/hosts/osaka-vultr-01/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/nixos/hosts/osaka-vultr-01/default.nix b/nixos/hosts/osaka-vultr-01/default.nix index 2f13902d..6380dbbe 100644 --- a/nixos/hosts/osaka-vultr-01/default.nix +++ b/nixos/hosts/osaka-vultr-01/default.nix @@ -36,7 +36,11 @@ }; # Wireguard Forwarder - boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; }; + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = true; + "net.ipv4.conf.all.forwarding" = 1; + "net.ipv4.conf.default.forwarding" = 1; + }; networking.firewall.allowPing = true; networking.wireguard = { enable = true; @@ -67,13 +71,17 @@ }; }; + services.xinetd = { + enable = true; + }; + networking.nat = { enable = true; internalInterfaces = [ "wireguard0" ]; externalInterface = "eno3"; - # forwardPorts = [ - # { sourcePort = 80; destination = "10.100.0.2:80"; } - # { sourcePort = 443; destination = "10.100.0.2:443"; } - # ]; + forwardPorts = [ + { sourcePort = 80; destination = "10.100.0.2:80"; } + { sourcePort = 443; destination = "10.100.0.2:443"; } + ]; }; } \ No newline at end of file