Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root @ 5df9303f

Nom Taille Révision Âge Auteur Commentaire
  files 5df9303f plus de 4 ans tr Replace filter with inet-filter
  manifests 5df9303f plus de 4 ans tr Replace filter with inet-filter
  spec 5df9303f plus de 4 ans tr Replace filter with inet-filter
.fixtures.yml 253 octets ecb63cef plus de 4 ans tr Add dependencies
.gitattributes 62 octets 321ae8ab plus de 4 ans tr Add Puppet module basic files
.gitignore 266 octets 050f1005 plus de 4 ans tr Git ignore Puppet module stuff
.gitlab-ci.yml 706 octets 73ef24d3 plus de 4 ans tr Drop Puppet 5 support
.pdkignore 423 octets 321ae8ab plus de 4 ans tr Add Puppet module basic files
.puppet-lint.rc 11 octets 321ae8ab plus de 4 ans tr Add Puppet module basic files
.rspec 31 octets 321ae8ab plus de 4 ans tr Add Puppet module basic files
.rubocop.yml 3,56 ko e89da898 plus de 4 ans tr Linting
.yardopts 18 octets 321ae8ab plus de 4 ans tr Add Puppet module basic files
Gemfile 3,21 ko 186a64ca plus de 4 ans tr Add gemfile and rakefile for Puppet lint and spec
README.md 2,6 ko 0ba57c66 plus de 4 ans mh initial release
Rakefile 3,17 ko 186a64ca plus de 4 ans tr Add gemfile and rakefile for Puppet lint and spec
metadata.json 1,19 ko ecb63cef plus de 4 ans tr Add dependencies

Dernières révisions

# Date Auteur Commentaire
5df9303f 2020-08-30 05:24 tr

Replace filter with inet-filter

8efbdf9a 2020-08-29 19:05 tr

Refactoring

e89da898 2020-08-29 14:31 tr

Linting

f34dae00 2020-08-29 14:14 tr

Spec tests for default rules

3ccc62ae 2020-08-29 13:52 tr

Add spec tests for default chains

be6aa569 2020-08-29 13:25 tr

Add spec tests for filter chains

a04bdb5e 2020-08-29 13:24 tr

Add a newline to filter chains

f6848bb8 2020-08-29 13:01 tr

Explicitly set ensure file

5d3f76a0 2020-08-29 12:38 tr

Disable some rubocop checks for spec files

5acb554a 2020-08-29 12:06 tr

Write some spec tests for init class

Voir toutes les révisions | Voir les révisions

README


nftables puppet module

This module manages an opinionated nftables configuration

By default it sets up a firewall that drops every incoming and outgoing connection.

It only allows outgoing dns,ntp and web traffic.

The config file has a inet filter and a ip nat table setup.

Additionally, the module comes with a basic infrastrcuture to hook into different places.

nftables config

The main configuration file loaded by the nftables service will be files/config/puppet.nft, all other files created by that module go into files/config/puppet and will also be purged if not managed anymore.

The main configuration file includes dedicated files for the filter and nat tables, as well as processes any custom-*.nft files before hand.

The filter and NAT tables both have all the master chains (INPUT,OUTPUT,FORWARD) configured, to which you can hook in your own chains that can contain specific rules.

All filter masterchains drop by default. By default we have a set of default_MASTERCHAIN chains configured to which you can easily add your custom rules.

For specific needs you can add your own chain.

There is a global chain, that defines the default behavior for all masterchains.

INPUT and OUTPUT to the loopback device is allowed by default, though you could restrict it later.

nftables::config

Manages a raw file in /etc/nftables/puppet/${name}.nft

Use this for any custom table files.

nftables::chain_file

Prepares a chain file as a concat file to which you will be able to add dedicated rules through concat::fragments.

The name must follow the pattern TABLE@chain_name, e.g. filter@my_chain. This will a) prepare a snippet defining the chain, that will be included in the filter table.

This define is more intended as a helper to setup chains that will be used for the different tables, through their own defines. See nftables::filter::chain as an example.

nftables::filter::chain

This setups a chain for the filter table. You will be able to add rules to that chain by using nftables::filter::chain::rule.

The name must follow the pattern: MASTERCHAIN-new_chain_name, which defines to which masterchain that custom chain should be hooked into.

newchainname must be unique for all chains.

There is automatically a jump instruction added to the masterchain, with the order preference.

nftables::filter::chain::rule

A simple way to add rules to your custom chain. The name must be: CHAIN_NAME-rulename, where CHAIN_NAME refers to your chain and an arbitrary name for your rule. The rule will be a concat::fragment to the chain concat.

You can define the order by using the order param.

Formats disponibles : Atom