Puppet Class: nftables::rules::out::mdns

Defined in:
manifests/rules/out/mdns.pp

Summary

allow outgoing multicast DNS

Overview

Parameters:

  • ipv4 (Boolean) (defaults to: true)

    Allow mdns over IPv4

  • ipv6 (Boolean) (defaults to: true)

    Allow mdns over IPv6

  • oifname (Array[String[1]]) (defaults to: [])

    optional name for outgoing interfaces



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/rules/out/mdns.pp', line 8

class nftables::rules::out::mdns (
  Boolean $ipv4 = true,
  Boolean $ipv6 = true,
  Array[String[1]] $oifname = [],
) {
  if empty($oifname) {
    $_oifname = ''
  } else {
    $oifdata = $oifname.map |String[1] $interface| { "\"${interface}\"" }.join(', ')
    $_oifname = "oifname { ${oifdata} } "
  }
  if $ipv4 {
    nftables::rule { 'default_out-mdns_v4':
      content => "${_oifname}ip daddr 224.0.0.251 udp dport 5353 accept",
    }
  }
  if $ipv6 {
    nftables::rule { 'default_out-mdns_v6':
      content => "${_oifname}ip6 daddr ff02::fb udp dport 5353 accept",
    }
  }
}