OnCallReadyStart learning

nft: Administration tool of the nftables framework for packet filtering and classification

nft [ -s ] list { ruleset [family] | tables [family] | table [family] TABLE | chains [family] | chain [family] TABLE CHAIN }

What it does

nftables is the kernel packet filter under iptables-nft: every iptables / ip6tables rule on these nodes is an nftables rule, and nft lists them all, in its own syntax.

Options you will use

list ruleset [family]
Print the whole ruleset (or only one family: ip, ip6, inet, arp, bridge, netdev).
list tables [family]
List the tables.
list table [family] TABLE
List all chains and rules of the table (family defaults to ip).
list chains [family]
List the chains: their declarations only, without rules.
list chain [family] TABLE CHAIN
List all rules of the chain.
-s, --stateless
Omit stateful information of rules and stateful objects (counter values).
-v, --version
Show version.

Examples

$ sudo nft list ruleset

everything kube-proxy, kubelet, Calico and ufw loaded, IPv4 and IPv6

$ sudo nft list chain ip filter INPUT

one chain

$ sudo nft list tables

ip / ip6 filter, nat, mangle - the iptables-nft tables

Gotchas

Try nft in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.