diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-01-08 15:50:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-01-08 15:50:26 -0300 |
commit | 3d1cf84f39fece3f2a9f8b7247a792212eb81177 (patch) | |
tree | f1fa5ca591908d363d13d30256f7af3b242d2d6b /manifests/docker.pp | |
parent | 55fa862bae8e2582e5ac0c008a0bb0ec53d9bfff (diff) | |
download | puppet-firewall-3d1cf84f39fece3f2a9f8b7247a792212eb81177.tar.gz puppet-firewall-3d1cf84f39fece3f2a9f8b7247a792212eb81177.tar.bz2 |
Feat: major refactor
Diffstat (limited to 'manifests/docker.pp')
-rw-r--r-- | manifests/docker.pp | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/manifests/docker.pp b/manifests/docker.pp index 5cc1e68..3f96b0e 100644 --- a/manifests/docker.pp +++ b/manifests/docker.pp @@ -1,28 +1,8 @@ -# See http://serverfault.com/questions/579726/docker-shorewall -class firewall::docker($device = 'eth0') { - class { 'firewall::forwarding': } - - shorewall::masq { "${device}-dock": - interface => "${device}", - source => '172.17.0.0/16', - order => '10', - } - - shorewall::zone { 'dock': - type => 'ipv4', - order => '10', - } - - shorewall::policy { 'dock-all': - sourcezone => 'dock', - destinationzone => 'all', - policy => 'ACCEPT', - order => 10, - } - - shorewall::interface { 'docker0': - zone => 'dock', - rfc1918 => false, - options => 'tcpflags,blacklist,routefilter,nosmurfs,logmartians', +class firewall::docker( + $implementation = lookup('firewall::implementation', undef, undef, 'shorewall'), + $device = 'eth0', +) { + class { "firewall::implementations::${implementation}::docker": + device => $device, } } |