additionally create chain rule in OUTPUT

otherwise they won't work locally on the swarm workers
master
lub 5 years ago
parent f8969e5f4a
commit 8712db3763

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

Loading…
Cancel
Save