X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Ffirewall.pp;h=0314cc45c6c9222b1230e8e4fe2f3438118eb894;hb=e44a96b6508415fb4ed53c9c452a8d1b555e95af;hp=8cb253d0aee6b7bed9503577876930d10df7d3fb;hpb=632bff4536d7a7411c38a3e5e5954d67dba12a1a;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/firewall.pp b/modules/ganeti2/manifests/firewall.pp index 8cb253d0a..0314cc45c 100644 --- a/modules/ganeti2/manifests/firewall.pp +++ b/modules/ganeti2/manifests/firewall.pp @@ -6,44 +6,50 @@ class ganeti2::firewall { $ganeti_priv = $ganeti2::params::ganeti_priv $drbd = $ganeti2::params::drbd - @ferm::conf { 'ganeti2': + ferm::conf { 'ganeti2': content => template('ganeti2/defs.conf.erb') } - @ferm::rule { 'dsa-ganeti-noded-v4': + ferm::rule { 'dsa-ganeti-noded': description => 'allow ganeti-noded communication', - rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', + domain => '(ip ip6)', + rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI) daddr ($HOST_GANETI) ACCEPT; }', notarule => true, } - @ferm::rule { 'dsa-ganeti-confd-v4': + ferm::rule { 'dsa-ganeti-confd': description => 'allow ganeti-confd communication', - rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', + domain => '(ip ip6)', + rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI) daddr ($HOST_GANETI) ACCEPT; }', notarule => true, } - @ferm::rule { 'dsa-ganeti-rapi-v4': + ferm::rule { 'dsa-ganeti-rapi': description => 'allow ganeti-rapi communication', - rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', + domain => '(ip ip6)', + rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI) daddr ($HOST_GANETI) ACCEPT; }', notarule => true, } - @ferm::rule { 'dsa-ganeti-kvm-migration-v4': + ferm::rule { 'dsa-ganeti-kvm-migration': description => 'allow ganeti kvm migration ', - rule => 'proto tcp dport 8102 @subchain \'ganeti-kvm-migration\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', + domain => '(ip ip6)', + rule => 'proto tcp dport 8102 @subchain \'ganeti-kvm-migration\' { saddr ($HOST_GANETI_BACKEND) daddr ($HOST_GANETI_BACKEND) ACCEPT; }', notarule => true, } - @ferm::rule { 'dsa-ganeti-ssh-v4': + ferm::rule { 'dsa-ganeti-ssh': description => 'allow ganeti to ssh around', - rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI_V4 $HOST_GANETI_BACKEND_V4) ACCEPT; }', + domain => '(ip ip6)', + rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI $HOST_GANETI_BACKEND) ACCEPT; }', notarule => true, } if $drbd { - @ferm::rule { 'dsa-ganeti-drbd-v4': + ferm::rule { 'dsa-ganeti-drbd': description => 'allow ganeti drbd communication', - rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'ganeti-drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', + domain => '(ip ip6)', + rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'ganeti-drbd\' { saddr ($HOST_GANETI_BACKEND) daddr ($HOST_GANETI_BACKEND) ACCEPT; }', notarule => true, } }