just enable IP forwarding on router instead of full NAT module

This commit is contained in:
Katherina Walshe-Grey 2024-08-06 20:05:37 +01:00
parent 752faa333d
commit 2fd6d96a00

View file

@ -61,13 +61,12 @@ in
}
];
networking = {
nat = mkIf host.isRouter {
enable = true;
enableIPv6 = true;
internalInterfaces = [ "birdsong" ];
};
boot.kernel.sysctl = mkIf host.isRouter {
"net.ipv4.conf.${cfg.interface}.forwarding" = true;
"net.ipv6.conf.${cfg.interface}.forwarding" = true;
};
networking = {
firewall.allowedUDPPorts = mkIf cfg.openPorts [ host.port ];
wireguard.interfaces.${cfg.interface} = {