forked from PeterJCLaw/srcomp-puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firewall.pp
62 lines (55 loc) · 1.26 KB
/
firewall.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
class compbox::firewall {
class { 'firewall': }
resources { 'firewall':
purge => true,
}
Firewall {
before => Class['compbox::fw_post'],
require => Class['compbox::fw_pre'],
}
class { ['compbox::fw_pre', 'compbox::fw_post']: }
# SSH
firewall { '100 allow ssh access':
dport => 22,
proto => tcp,
action => accept,
}
firewall { '100 allow ssh access (v6)':
dport => 22,
proto => tcp,
action => accept,
provider => 'ip6tables',
}
# NTP
firewall { '100 allow ntp access':
dport => 123,
proto => udp,
action => accept,
}
firewall { '100 allow ntp access (v6)':
dport => 123,
proto => udp,
action => accept,
provider => 'ip6tables',
}
# HTTP(S)
firewall { '100 allow http and https access':
dport => [80, 443],
proto => tcp,
action => accept,
}
firewall { '100 allow http and https access (v6)':
dport => [80, 443],
proto => tcp,
action => accept,
provider => 'ip6tables',
}
# Mythic Beasts
firewall { '200 allow Mythic Beasts\' monitoring access (v6)':
dport => 4949,
source => '2a00:1098:0:80:1000::100',
proto => tcp,
action => accept,
provider => 'ip6tables',
}
}