diff options
Diffstat (limited to 'hosts/flex-wg-router/configuration.nix')
| -rw-r--r-- | hosts/flex-wg-router/configuration.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hosts/flex-wg-router/configuration.nix b/hosts/flex-wg-router/configuration.nix index 22fd06d..3f6ad06 100644 --- a/hosts/flex-wg-router/configuration.nix +++ b/hosts/flex-wg-router/configuration.nix @@ -48,6 +48,16 @@ in { allowedUDPPorts = [ 51820 ]; }; }; + # NAT/masquerade lan0 allowing wg0 clients to access lan0 + nftables.tables.wg-nat = { + family = "ip"; + content = '' + chain post { + type nat hook postrouting priority srcnat; policy accept; + iifname "wg0" oifname "lan0" masquerade comment "wg0 => lan0" + } + ''; + }; }; # Router config |
