firefox considers style in .svg things "unsafe-inline" settings, so we need a differe...
[mirror/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         $drbd         = $ganeti2::params::drbd
8
9         @ferm::conf { 'ganeti2':
10                 content => template('ganeti2/defs.conf.erb')
11         }
12
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; }',
16                 notarule    => true,
17         }
18
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; }',
22                 notarule    => true,
23         }
24
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; }',
28                 notarule    => true,
29         }
30
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; }',
34                 notarule    => true,
35         }
36
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; }',
40                 notarule    => true,
41         }
42
43         if $drbd {
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; }',
47                         notarule    => true,
48                 }
49         }
50 }