diff --git a/expose_forwards.ps1 b/expose_forwards.ps1 index 5e176d8..ae6b8bb 100644 --- a/expose_forwards.ps1 +++ b/expose_forwards.ps1 @@ -98,7 +98,13 @@ function Get-DockerIngressAddress { # setup SWARM-NAT chain Write-Output ('Create chain {0}' -f $Chain) Add-IptablesChain -Chain $Chain -Add-IptablesRule -Chain 'PREROUTING' -Rule '-m','addrtype','--dst-type','LOCAL','-j',$Chain +$chain_rule = @( + '-m','addrtype' + '--dst-type','LOCAL' + '-j',$Chain +) +Add-IptablesRule -Chain 'PREROUTING' -Rule $chain_rule +Add-IptablesRule -Chain 'OUTPUT' -Rule $chain_rule $ingress_address = Get-DockerIngressAddress