From 57c4a5ac2730330675f027bc1cd5908a7a1a8116 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 19 Sep 2025 14:08:05 +0200 Subject: [PATCH] Forward traffic from apex to ethernet via NAT --- m/raccoon/wireguard.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/m/raccoon/wireguard.nix b/m/raccoon/wireguard.nix index 31f7d699..25650f8c 100644 --- a/m/raccoon/wireguard.nix +++ b/m/raccoon/wireguard.nix @@ -1,6 +1,13 @@ -{ config, ... }: +{ config, pkgs, ... }: { + networking.nat = { + enable = true; + enableIPv6 = false; + externalInterface = "eno0"; + internalInterfaces = [ "wg0" ]; + }; + networking.firewall = { allowedUDPPorts = [ 666 ]; }; @@ -25,8 +32,9 @@ { name = "apex"; publicKey = "VwhcN8vSOzdJEotQTpmPHBC52x3Hbv1lkFIyKubrnUA="; - allowedIPs = [ "10.106.0.30/32" ]; + allowedIPs = [ "10.106.0.30/32" "192.168.0.0/24" ]; endpoint = "ssfhead.bsc.es:666"; + persistentKeepalive = 25; } ]; };