]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ganeti2/manifests/firewall.pp
add params for ganeti
[dsa-puppet.git] / modules / ganeti2 / manifests / firewall.pp
1 class ganeti2::firewall {
2
3         include ganeti2::params
4
5         $ganeti_hosts = $ganeti2::params::ganeti_hosts
6         $ganeti_priv  = $ganeti2::params::ganeti_priv
7
8         @ferm::conf { 'ganeti2':
9                 content => template('ganeti2/defs.conf.erb')
10         }
11
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; }',
15                 notarule    => true,
16         }
17
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; }',
21                 notarule    => true,
22         }
23
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; }',
27                 notarule    => true,
28         }
29
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; }',
33                 notarule    => true,
34         }
35
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; }',
39                 notarule    => true,
40         }
41
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; }',
45                 notarule    => true,
46         }
47 }