nat: exclude lo from masquerade
This commit is contained in:
parent
d638a73d3e
commit
0c63cfbe7a
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@
|
||||||
# port-forward ssh to the music machine
|
# port-forward ssh to the music machine
|
||||||
extraCommands = ''
|
extraCommands = ''
|
||||||
iptables -t nat -I PREROUTING -p tcp --dport 2020 -j DNAT --to-destination 10.34.45.101:22
|
iptables -t nat -I PREROUTING -p tcp --dport 2020 -j DNAT --to-destination 10.34.45.101:22
|
||||||
iptables -t nat -A POSTROUTING -j MASQUERADE
|
iptables ! -o lo -t nat -A POSTROUTING -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
extraStopCommands = ''
|
extraStopCommands = ''
|
||||||
iptables -t nat -D PREROUTING -p tcp --dport 2020 -j DNAT --to-destination 10.34.45.101:22 || true
|
iptables -t nat -D PREROUTING -p tcp --dport 2020 -j DNAT --to-destination 10.34.45.101:22 || true
|
||||||
|
|
Loading…
Add table
Reference in a new issue