From b0eaa7929d6fd77566cf496e74e1ed27162457a0 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Wed, 28 Jun 2023 14:21:54 +0200 Subject: [PATCH] Wireguard Signed-off-by: Magic_RB --- nixos/systems/toothpick/networking.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/systems/toothpick/networking.nix b/nixos/systems/toothpick/networking.nix index c00eba8..5a7ec91 100644 --- a/nixos/systems/toothpick/networking.nix +++ b/nixos/systems/toothpick/networking.nix @@ -41,6 +41,14 @@ in dhcpcd.enable = false; usePredictableInterfaceNames = lib.mkForce false; + nat.forwardPorts = [ + { + destination = "127.0.0.1:6666"; + proto = "udp"; + sourcePort = 500; + } + ]; + firewall = { extraCommands = '' iptables -P FORWARD DROP @@ -54,6 +62,7 @@ in ]; allowedUDPPorts = [ 6666 + 500 ]; };