Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


fortgeschrittene:nftables

Dies ist eine alte Version des Dokuments!


nftables beobachten

watch -d nft -a list ruleset

nftables Regeln zurücksetzen

nft flush ruleset

erste nftables Regeln

iptables-ähnliche Tabellen und Chains anlegen

interaktiv

nft -ia
add table inet filter
add chain inet filter input { type filter hook input priority 0; policy accept; }
add chain inet filter forward { type filter hook forward priority 0; policy accept; }
add chain inet filter output { type filter hook output priority 0; policy accept; }

mit Konfigurationsdatei

Erste Zeile flush ruleset beachten, sonst werden die Regeln hinzugefügt.

nftables.conf
flush ruleset
table inet filter {
        chain input {
                type filter hook input priority 0; policy accept;
        }
        chain forward {
                type filter hook forward priority 0; policy accept;
        }
        chain output {
                type filter hook output priority 0; policy accept;
        }
}
nft -f nftables.conf

aktuelle nftables Regeln speichern

nft -s flush ruleset > /etc/nftables.conf

nft Syntax

action object family
create ruleset inet
add table ip
delete chain ip6
rename rule
list
flush
insert
replace

1)

Doku

1)
inspiriert von:
fortgeschrittene/nftables.1578052332.txt.gz · Zuletzt geändert: 2020/01/03 11:52 von ingo_wichmann