]> gitweb.fluxo.info Git - puppet-ferm.git/commit
add ability to define rules in tables != filter
authorThore Bödecker <me@foxxx0.de>
Tue, 3 Sep 2019 09:56:58 +0000 (11:56 +0200)
committerThore Bödecker <me@foxxx0.de>
Wed, 11 Sep 2019 11:20:35 +0000 (13:20 +0200)
commit882a45498ddefdfc83ff5b19da723fd0be3acdec
tree523f7a96c5b2640dbf2dd45cd89d931e12ceff9d
parent81748ba786c6a55c4575a400c08de99716da8fbb
add ability to define rules in tables != filter

Previously it was neither possible to properly define custom chains nor
to define rules in tables other than the default filter table.
For various legitimate reasons it can be required to define rules in the
raw, nat or mangle tables, e.g. to use NOTRACK or to configure
DNAT/SNAT/MASQUERADE.
Additionally it might come in handy to define custom chains to group
certain rules and allow a more efficient evaluation for incoming packets
by not cramming all rules into the filter/INPUT chain so that
(worst-case) all packets need to traverse and evaluate all rules.

I have tried to maintain backwards compatibility and to not change
default filenames/paths so that it won't result in leftover obsolete unmaged
files from previous versions of this module.

In order to improve the naming schema the rule $policy has been renamed
to $action, however both parameters are available and optional now, with
some sanity checks that require at most one of them and issueing a
warning() for users of the now deprecated $policy parameter.

All previous tests have been adapted to the changes, a long with an
additional set of tests for the new feature.

Fixes #61
17 files changed:
REFERENCE.md
manifests/chain.pp
manifests/config.pp
manifests/init.pp
manifests/rule.pp
spec/acceptance/ferm_spec.rb
spec/classes/ferm_spec.rb
spec/defines/chain_spec.rb
spec/defines/rule_spec.rb
spec/spec_helper.rb
templates/ferm-table-chain-config-include.epp [new file with mode: 0644]
templates/ferm.conf.epp
templates/ferm_chain_header.conf.epp
templates/ferm_header.conf.epp
types/actions.pp [new file with mode: 0644]
types/policies.pp
types/tables.pp [new file with mode: 0644]