Modern Linux packet filtering framework replacing iptables.
high risk
nft -c -f /etc/nftables.confCheck the syntax without applying.nft list ruleset > /root/nft.backupBack up first.nftables is the successor to iptables/ip6tables, using a unified syntax for IPv4, IPv6, ARP, and bridge filtering. It's the default on Debian 10+, RHEL 8+. Rules are organized into tables → chains → rules. The nft command manages everything.
nft list rulesetShow all current nftables rules · explain & risk-check →nft add table inet filterCreate a table for IPv4+IPv6 filtering · explain & risk-check →nft add chain inet filter input '{ type filter hook input priority 0; policy drop; }'Create input chain with default drop policy · explain & risk-check →nft add rule inet filter input tcp dport 22 acceptAllow SSH · explain & risk-check →nft -f /etc/nftables.confLoad rules from config file · explain & risk-check →Use `nft list ruleset > /etc/nftables.conf` to export and save current rules — then `nft -f /etc/nftables.conf` on boot to restore them. Much cleaner than iptables-save.
Reference text is hand-written and may be incomplete — check man nftables for your version. Test destructive commands on a non-production system first.