_Public Classes_
-* [`ferm`](#ferm): Class: ferm This class manages ferm installation and rule generation on modern linux systems class{'ferm': manage_service => true, }
+* [`ferm`](#ferm): Class: ferm This class manages ferm installation and rule generation on modern linux systems class{'ferm': manage_service => true, ip_v
_Private Classes_
This class manages ferm installation and rule generation on modern linux systems
class{'ferm':
- manage_service => true,
+ manage_service => true,
+ ip_versions => ['ip6'],
}
#### Examples
-##### deploy ferm and start it
+##### deploy ferm and start it, on node with only ipv6 enabled
```puppet
Default value: false
Allowed values: (true|false)
+##### `ip_versions`
+
+Data type: `Array[Enum['ip','ip6']]`
+
+Set list of versions of ip we want ot use.
+Default value: ['ip', 'ip6']
+
## Defined types
### ferm::chain
ferm::input_log_dropped_packets: false
ferm::forward_log_dropped_packets: false
ferm::output_log_dropped_packets: false
+ferm::ip_versions:
+ - ip
+ - ip6
# this is a private class
assert_private("You're not supposed to do that!")
+ $_ip = join($ferm::ip_versions, ' ')
+
# copy static files to ferm
# on a long term point of view, we want to package this
file{'/etc/ferm.d':
concat::fragment{'ferm.conf':
target => $ferm::configfile,
- content => epp("${module_name}/ferm.conf.epp"),
+ content => epp(
+ "${module_name}/ferm.conf.epp", {
+ 'ip' => $_ip,
+ }
+ ),
order => '50',
}
}
#
# This class manages ferm installation and rule generation on modern linux systems
#
-# @example deploy ferm and start it
+# @example deploy ferm and start it, on node with only ipv6 enabled
# class{'ferm':
-# manage_service => true,
+# manage_service => true,
+# ip_versions => ['ip6'],
# }
#
# @param manage_service Disable/Enable the management of the ferm daemon
# @param input_log_dropped_packets Enable/Disable logging in the INPUT chain of packets to the kernel log, if no explicit chain matched
# Default value: false
# Allowed values: (true|false)
+# @param ip_versions Set list of versions of ip we want ot use.
+# Default value: ['ip', 'ip6']
class ferm (
Boolean $manage_service,
Boolean $manage_configfile,
Boolean $output_log_dropped_packets,
Boolean $input_log_dropped_packets,
Hash $rules,
+ Array[Enum['ip','ip6']] $ip_versions,
) {
contain ferm::install
contain ferm::config
+<%- | String[1] $ip | -%>
# End custom section
-domain (ip ip6) table filter {
+domain (<%= $ip %>) table filter {
chain INPUT {
interface lo ACCEPT;
@include '/etc/ferm.d/chains/INPUT.conf';