system/wireguard: fix setup/shutdown commands

This commit is contained in:
LavaDesu 2022-02-13 15:40:11 +07:00
parent c4e2846818
commit 7a9d0481ee
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -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
'';