-
-
Save dhollinger/fdd24f3b8989fd9f2e86fdabb5404d12 to your computer and use it in GitHub Desktop.
Make puppetlabs-firewall works with docker smoothly
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
class my_fw::pre { | |
# Disable due to selective purges of firewallchain | |
# resources { "firewall": | |
# purge => true | |
# } | |
# Avoid removing Docker rules: | |
firewallchain { 'FORWARD:filter:IPv4': | |
purge => true, | |
ignore => [ 'docker' ], | |
} | |
firewallchain { 'DOCKER:filter:IPv4': | |
purge => false, | |
} | |
firewallchain { 'DOCKER:nat:IPv4': | |
purge => false, | |
} | |
firewallchain { 'POSTROUTING:nat:IPv4': | |
purge => true, | |
ignore => [ 'docker', '172.17' ], | |
} | |
firewallchain { 'PREROUTING:nat:IPv4': | |
purge => true, | |
ignore => [ 'DOCKER' ], | |
} | |
#ensure input rules are cleaned out | |
firewallchain { 'INPUT:filter:IPv4': | |
ensure => present, | |
purge => true, | |
} | |
# Block what ever..... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment