system/wireguard: fix setup/shutdown commands
This commit is contained in:
parent
c4e2846818
commit
7a9d0481ee
1 changed files with 4 additions and 2 deletions
|
|
@ -82,11 +82,13 @@ let
|
||||||
ips = client.allowedIPs;
|
ips = client.allowedIPs;
|
||||||
listenPort = port;
|
listenPort = port;
|
||||||
|
|
||||||
postSetup = mappedAdd + ''
|
postSetup = ''
|
||||||
|
${mappedAdd}
|
||||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${serverInterface} -j MASQUERADE
|
${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
|
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${serverInterface} -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue