From d1b60b26f8fc27132dc28819b65a44d8478dbbf9 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 30 Dec 2025 14:06:58 +0100 Subject: [PATCH] chore(kb): revise articles about network traffic filtering a bit more --- knowledge base/nftables.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/knowledge base/nftables.md b/knowledge base/nftables.md index 6779675..19663cf 100644 --- a/knowledge base/nftables.md +++ b/knowledge base/nftables.md @@ -104,6 +104,10 @@ nft -s list ruleset > '/path/to/nftables.dump' # Read commands from files. nft --file 'path/to/file' nft -f 'path/to/file' + +# Listen to all events. +# Reports in the native nft format. +nft monitor ``` @@ -141,6 +145,8 @@ nft chain 'inet' 'my_table' 'my_input' '{ policy drop ; }' # Add rules to chains. nft add rule 'inet' 'base_table' 'input_filter' tcp dport 80 drop +nft add rule 'ip' 'ssh' 'ssh_chain' tcp dport 22 accept +nft add rule 'inet' 'filter' 'input' log # Delete chains. nft delete chain 'inet' 'base_table' 'input_filter'