just enable IP forwarding on router instead of full NAT module
This commit is contained in:
parent
752faa333d
commit
2fd6d96a00
1 changed files with 5 additions and 6 deletions
11
peering.nix
11
peering.nix
|
@ -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} = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue