root / manifests / rules / out / icmp.pp @ f9de4dee
Historique | Voir | Annoter | Télécharger (993 octets)
1 | 09cba182 | Steve Traylen | # @summary control outbound icmp packages |
---|---|---|---|
2 | 79e9a23f | Nacho Barrientos | class nftables::rules::out::icmp ( |
3 | 09cba182 | Steve Traylen | # lint:ignore:parameter_documentation |
4 | 79e9a23f | Nacho Barrientos | Optional[Array[String]] $v4_types = undef, |
5 | Optional[Array[String]] $v6_types = undef, |
||
6 | 31b17627 | Steve Traylen | String $order = '10', |
7 | 09cba182 | Steve Traylen | # lint:endignore |
8 | 79e9a23f | Nacho Barrientos | ) { |
9 | if $v4_types { |
||
10 | $v4_types.each | String $icmp_type | { |
||
11 | f9de4dee | Tim Meusel | nftables::rule { 'default_out-accept_icmpv4': |
12 | content => "ip protocol icmp icmp type ${icmp_type} accept", |
||
13 | order => $order, |
||
14 | 79e9a23f | Nacho Barrientos | } |
15 | } |
||
16 | } else { |
||
17 | f9de4dee | Tim Meusel | nftables::rule { 'default_out-accept_icmpv4': |
18 | content => 'ip protocol icmp accept', |
||
19 | order => $order, |
||
20 | 11bf7237 | Steve Traylen | } |
21 | 79e9a23f | Nacho Barrientos | } |
22 | |||
23 | if $v6_types { |
||
24 | $v6_types.each | String $icmp_type | { |
||
25 | f9de4dee | Tim Meusel | nftables::rule { 'default_out-accept_icmpv6': |
26 | content => "ip6 nexthdr ipv6-icmp icmpv6 type ${icmp_type} accept", |
||
27 | order => $order, |
||
28 | 79e9a23f | Nacho Barrientos | } |
29 | } |
||
30 | } else { |
||
31 | f9de4dee | Tim Meusel | nftables::rule { 'default_out-accept_icmpv6': |
32 | content => 'ip6 nexthdr ipv6-icmp accept', |
||
33 | order => $order, |
||
34 | 11bf7237 | Steve Traylen | } |
35 | 79e9a23f | Nacho Barrientos | } |
36 | } |