Projet

Général

Profil

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

root @ a074dec2

Nom Taille Révision Âge Auteur Commentaire
  files 9adf6851 plus de 4 ans tr Add mld-listener-done to the list of allowed ic...
  manifests a074dec2 plus de 4 ans tr Allow index numbers
  spec 3d29a6eb plus de 4 ans tr Add a rule to create snat
.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,37 ko 8f5d09ec 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
LICENSE 11,1 ko 44ac0a4e plus de 4 ans mh add license file
README.md 2,29 ko af544fea plus de 4 ans tr Create a special ingoing chain for all ingoing ...
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
a074dec2 2020-10-14 12:23 tr

Allow index numbers

25205881 2020-10-14 12:15 tr

Fix rule puppet out

4db4422a 2020-10-13 14:24 tr

Add http and https

44ac0a4e 2020-10-11 06:52 mh

add license file

a6316327 2020-08-31 06:51 tr

Use enum instead of pattern for proto

3d29a6eb 2020-08-31 06:13 tr

Add a rule to create snat

a0d5c724 2020-08-31 06:12 tr

Test masquerade default proto

2a3b45ec 2020-08-31 05:38 tr

Add a define for masquerading

a5205d2f 2020-08-31 05:01 tr

Extract the dnat spec tests

7cc88e25 2020-08-30 11:08 tr

Linting

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 and ingoing ssh 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 in case of filter and PREROUTING and POSTROUTING in case of NAT) 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

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

The name must be unique for all chains. The inject parameter can be used to directly add a jump to a masterchain. inject must follow the pattern ORDER-MASTERCHAIN, where order references a 2-digit number which defines the rule order (by default use e.g. 20) and masterchain references the chain to hook in the new chain. It's possible to specify the in-interface name and out-interface name for the inject rule.

nftables::rule

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

You can define the order by using the order param.

Formats disponibles : Atom