Révision 6824a5a3
add basic usage instructions right at the top
I couldn't figure out how to use this module when I looked at the
README. It was quickly going into pretty arcane stuff like "inet
filter" and "ip nat table" which might make sense for the module
authors or people used to nftables/iptables, but are pretty
implementation specific when coming from another networking
background.
Instead, we just explain more clearly what the module does, and
how. We also provide more examples, including some that might seem
obvious ("you need to include nftables first") but were not obvious to
me at all.
I also add a warning about firewalld being stopped which seems
important as well.
Closes: #158
README.md | ||
---|---|---|
7 | 7 |
|
8 | 8 |
This module manages an opinionated nftables configuration. |
9 | 9 |
|
10 |
By default it sets up a firewall that drops every incoming |
|
11 |
and outgoing connection. |
|
10 |
By default it sets up a firewall that drops every connection, except |
|
11 |
outbound ICMP, DNS, NTP, HTTP, and HTTPS, and inbound ICMP and SSH |
|
12 |
traffic: |
|
12 | 13 |
|
13 |
It only allows outgoing dns, ntp and web and ingoing ssh |
|
14 |
traffic, although this can be overridden using parameters. |
|
14 |
include nftables |
|
15 | 15 |
|
16 |
The config file has a inet filter and a ip nat table setup. |
|
16 |
This can be overridden using parameters, for example, this allows all |
|
17 |
outbound traffic: |
|
17 | 18 |
|
18 |
Additionally, the module comes with a basic infrastructure |
|
19 |
to hook into different places. |
|
19 |
class { 'nftables': |
|
20 |
out_all => true, |
|
21 |
} |
|
22 |
|
|
23 |
There are also pre-built rules for specific services, for example this |
|
24 |
will allow a web server to serve traffic over HTTPS: |
|
25 |
|
|
26 |
include nftables |
|
27 |
include nftables::rules::https |
|
28 |
|
|
29 |
Note that the module conflicts with the `firewalld` system and will |
|
30 |
stop it in Puppet runs. |
|
20 | 31 |
|
21 | 32 |
## Configuration |
22 | 33 |
|
Formats disponibles : Unified diff