diff --git a/modules/system/wireguard.nix b/modules/system/wireguard.nix index b28a4dd..2218d31 100644 --- a/modules/system/wireguard.nix +++ b/modules/system/wireguard.nix @@ -82,11 +82,13 @@ let ips = client.allowedIPs; listenPort = port; - postSetup = mappedAdd + '' + postSetup = '' + ${mappedAdd} ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${serverInterface} -j MASQUERADE ''; - postShutdown = mappedDel + '' + postShutdown = '' + ${mappedDel} ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${serverInterface} -j MASQUERADE '';