re-add snat wg serv fw rules
This commit is contained in:
parent
3e56f5ffe3
commit
6ca1b26e84
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
||||||
x.protocols
|
x.protocols
|
||||||
|> map (protocol: ''
|
|> map (protocol: ''
|
||||||
iptables -t nat -A PREROUTING -p ${protocol} -d ${externalIp} --dport ${toString x.port} -j DNAT --to-destination ${x.destinationIp}
|
iptables -t nat -A PREROUTING -p ${protocol} -d ${externalIp} --dport ${toString x.port} -j DNAT --to-destination ${x.destinationIp}
|
||||||
|
iptables -t nat -A POSTROUTING -p ${protocol} -d ${x.destinationIp} --dport ${toString x.port} -j SNAT --to-source 172.245.52.19
|
||||||
''))
|
''))
|
||||||
|> b.concatLists
|
|> b.concatLists
|
||||||
|> b.concatStringsSep "\n";
|
|> b.concatStringsSep "\n";
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
x.protocols
|
x.protocols
|
||||||
|> map (protocol: ''
|
|> map (protocol: ''
|
||||||
iptables -t nat -D PREROUTING -p ${protocol} -d ${externalIp} --dport ${toString x.port} -j DNAT --to-destination ${x.destinationIp} || true
|
iptables -t nat -D PREROUTING -p ${protocol} -d ${externalIp} --dport ${toString x.port} -j DNAT --to-destination ${x.destinationIp} || true
|
||||||
|
iptables -t nat -D POSTROUTING -p ${protocol} -d ${x.destinationIp} --dport ${toString x.port} -j SNAT --to-source 172.245.52.19
|
||||||
''))
|
''))
|
||||||
|> b.concatLists
|
|> b.concatLists
|
||||||
|> b.concatStringsSep "\n";
|
|> b.concatStringsSep "\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue