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