|
|
@ -98,7 +98,13 @@ function Get-DockerIngressAddress {
|
|
|
|
# setup SWARM-NAT chain
|
|
|
|
# setup SWARM-NAT chain
|
|
|
|
Write-Output ('Create chain {0}' -f $Chain)
|
|
|
|
Write-Output ('Create chain {0}' -f $Chain)
|
|
|
|
Add-IptablesChain -Chain $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
|
|
|
|
$ingress_address = Get-DockerIngressAddress
|
|
|
|