Puppet Class: nftables::rules::out::icmp
- Defined in:
-
manifests/rules/out/icmp.pp
Summary
control outbound icmp packages
Overview
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
|
# File 'manifests/rules/out/icmp.pp', line 2
class nftables::rules::out::icmp (
# lint:ignore:parameter_documentation
Optional[Array[String]] $v4_types = undef,
Optional[Array[String]] $v6_types = undef,
String $order = '10',
# lint:endignore
) {
if $v4_types {
$v4_types.each | String $icmp_type | {
nftables::rule {
'default_out-accept_icmpv4':
content => "ip protocol icmp icmp type ${icmp_type} accept",
order => $order,
}
}
} else {
nftables::rule {
'default_out-accept_icmpv4':
content => 'ip protocol icmp accept',
order => $order,
}
}
if $v6_types {
$v6_types.each | String $icmp_type | {
nftables::rule {
'default_out-accept_icmpv6':
content => "ip6 nexthdr ipv6-icmp icmpv6 type ${icmp_type} accept",
order => $order,
}
}
} else {
nftables::rule {
'default_out-accept_icmpv6':
content => 'ip6 nexthdr ipv6-icmp accept',
order => $order,
}
}
}
|