- Description
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
This puppet module manages ferm and its rules.
class { 'ferm': }
To add a rule to the ferm rules.d directory:
ferm::rule { 'allow_http':
rules => ['proto tcp dport 80 ACCEPT'],
host => 'test3',
interface => 'eth1',
daddr => '10.255.1.10',
table => 'filter',
chain => 'INPUT',
description => 'Allow protocole http',
prio => '00',
notarule => false,
}
To add a hook to the ferm conf.d directory.
ferm::hook { 'conntrack_ftp':
description => 'Module nf_conntrack_ftp pour proftpd',
content_hook => 'modprobe nf_conntrack_ftp'
}
The ferm class performs all steps needed to the use of ferm such as package installation and configuration. Specific rules can be added later with ferm::rule or specific classes.
Parameters within ferm
:
Allow SSH connections.
Cache the output of ferm --lines in /var/cache/ferm?
Enable fast mode: ferm generates an iptables-save(8) file, and installs it with iptables-restore(8). This is much faster, because ferm calls iptables(8) once for every rule by default.
This creates an entry in the correct chain file for ferm.
Source IPv4/IPv6 address. Can be one or many of them. Multiple addresses are always encapsulated in braces: '(127.0.0.1 2003::)' IPv4 and IPv6 addresses can be mixed. CIDR notation is possible if you want to block networks, otherwise /32 or /128 is assumed by ferm/ip(6)tables
Define the interface name, your outside network card, like eth0, or dialup like ppp1, or whatever device you want to match for passing packets. It is equivalent to the -i switch in iptables(8).
Same as above, just for the destination IP address.
Specifies which netfilter table this rule will be inserted to: "filter" (default), "nat" or "mangle".
Specifies the netfilter chain (within the current table) this rule will be inserted to. Common predefined chain names are "INPUT", "OUTPUT", "FORWARD","PREROUTING", "POSTROUTING", depending on the table. If you specify a non-existing chain here, ferm will add the rule to a custom chain with that name.
The description of the rule.
Priority of the rule. Default: '00'.
ferm can be installed and used on:
- Debian Jessie
- Debian Stretch
- Debian Buster
- Debian Bullseye
This puppet module is licensed under the GPL version 3 or later. Redistribution and modification is encouraged.
The GPL version 3 license text can be found in the "LICENSE" file accompanying this puppet module, or at the following URL: