1 # Create an (empty) chain
3 # @param domain netfilter domain: ip (IPv4), ip6 (IPv6), or both.
4 # @param table netfilter table
5 # @param chain netfilter chain
6 # @param description a description of the rule
7 # @param prio Priority/Order of the rule
8 define ferm::rule::chain (
10 String $description = '',
11 Variant[Enum['ip', 'ip6'], Array[Enum['ip', 'ip6']]] $domain = ['ip', 'ip6'],
12 String $table = 'filter',
17 $real_domain = Array($domain, true)
20 "/etc/ferm/dsa.d/${prio}_${name}":
23 notify => Exec['ferm reload'],
24 content => inline_template( @(EOF) ),
25 domain (<%= @real_domain.join(' ') %>) {
27 chain <%= @chain %> {}