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