1 class ganeti2::firewall {
3 include ganeti2::params
5 $ganeti_hosts = $ganeti2::params::ganeti_hosts
6 $ganeti_priv = $ganeti2::params::ganeti_priv
7 $drbd = $ganeti2::params::drbd
9 @ferm::conf { 'ganeti2':
10 content => template('ganeti2/defs.conf.erb')
13 @ferm::rule { 'dsa-ganeti-noded-v4':
14 description => 'allow ganeti-noded communication',
15 rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }',
19 @ferm::rule { 'dsa-ganeti-confd-v4':
20 description => 'allow ganeti-confd communication',
21 rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }',
25 @ferm::rule { 'dsa-ganeti-rapi-v4':
26 description => 'allow ganeti-rapi communication',
27 rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }',
31 @ferm::rule { 'dsa-ganeti-kvm-migration-v4':
32 description => 'allow ganeti kvm migration ',
33 rule => 'proto tcp dport 8102 @subchain \'ganeti-kvm-migration\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }',
37 @ferm::rule { 'dsa-ganeti-ssh-v4':
38 description => 'allow ganeti to ssh around',
39 rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI_V4 $HOST_GANETI_BACKEND_V4) ACCEPT; }',
44 @ferm::rule { 'dsa-ganeti-drbd-v4':
45 description => 'allow ganeti drbd communication',
46 rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'ganeti-drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }',