use sysctl knob to enable forwarding, remove nat block

This commit is contained in:
Konarak 2025-09-12 09:17:21 +05:30
parent 193e73e4a8
commit a2d5333f01
Signed by: konarak
GPG Key ID: DE5E99432B548849

View File

@ -52,16 +52,12 @@ in {
dns = resolvers;
};
boot.kernel.sysctl = { "net.ipv6.conf.all.forwarding" = 1; };
imports = [ ./wireguard.nix ];
wireguard.interfaces = tunnels;
networking.firewall = { allowedUDPPorts = map (x: x.serverPort) tunnels; };
networking.nat = {
enable = true;
externalInterface = egress.interface;
internalInterfaces = map (x: x.interface) tunnels;
};
}