Skip to content

Instantly share code, notes, and snippets.

@jessebarocio
Created April 6, 2018 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessebarocio/c9543bc63e0ba535cce47605abf41376 to your computer and use it in GitHub Desktop.
Save jessebarocio/c9543bc63e0ba535cce47605abf41376 to your computer and use it in GitHub Desktop.
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