-
-
Save jessebarocio/c9543bc63e0ba535cce47605abf41376 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration DockerSwarm | |
{ | |
param | |
( | |
[Parameter()] | |
[System.String[]] | |
$NodeName = 'localhost' | |
) | |
Import-DscResource -ModuleName xNetworking | |
Node $NodeName | |
{ | |
xFirewall DockerSwarmTCP | |
{ | |
Name = 'DockerSwarmTCP' | |
DisplayName = 'Docker Swarm (TCP-in)' | |
Action = 'Allow' | |
Direction = 'Inbound' | |
LocalPort = ('2377', '7946') | |
Protocol = 'TCP' | |
Profile = 'Any' | |
Enabled = 'True' | |
} | |
xFirewall DockerSwarmUDP | |
{ | |
Name = 'DockerSwarmUDP' | |
DisplayName = 'Docker Swarm (UDP-in)' | |
Action = 'Allow' | |
Direction = 'Inbound' | |
LocalPort = ('7946', '4789') | |
Protocol = 'UDP' | |
Profile = 'Any' | |
Enabled = 'True' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment