nft
command-line interface for nftables packet filtering
TLDR
SYNOPSIS
nft [OPTIONS] [commands]
DESCRIPTION
nft is the command-line interface for nftables, the modern Linux kernel packet filtering framework that replaces iptables, ip6tables, arptables, and ebtables with a unified syntax and improved performance.nftables uses a hierarchy of tables, chains, and rules. Address families include inet (IPv4+IPv6), ip (IPv4 only), ip6 (IPv6 only), bridge, arp, and netdev. Rules can be loaded from files using `nft -f /etc/nftables.conf`.
PARAMETERS
list ruleset
Display the current complete rulesetadd table family name
Create a new tableadd chain family table chain specification
Create a new chainadd rule family table chain statement
Add a rule to a chaindelete rule family table chain handle n
Delete a rule by its handleflush ruleset
Remove all rules and tables--handle
Show rule handles for deletion--numeric
Show numeric output (no name resolution)
CAVEATS
Nftables syntax differs significantly from iptables. Tables must exist before chains, chains before rules. Changes are immediate but not persistent by default - save to /etc/nftables.conf for persistence.
HISTORY
nft is part of the nftables project, the successor to iptables, providing unified packet classification framework in the Linux kernel.
SEE ALSO
iptables(8), firewall-cmd(1)
