nft
Verified for current stable LTS
Nft Commands
Nft command syntax with verified terminal examples.
Commands
8 commands for Nft
nft Operations
Nft Command: Add Chain Accept Inbound Traffic
sudo nft add chain <inet> <filter> <input> \{ type <filter> hook <input> priority <0> \; policy <accept> \; \} nft HTTP
Nft Command: Add Nat Rule Translate Subnet
sudo nft add rule <nat> <postrouting> ip saddr <192.168.0.0/24> <masquerade> nft Operations
Nft Command: Add New Table Inet Filter
sudo nft add table <inet> <filter> nft HTTP
Nft Command: Add Rule Accept Tcp Ports
sudo nft add rule <inet> <filter> <input> <tcp> {{dport \{ telnet, ssh, http, https \} accept}} nft Operations
Nft Command: Delete Nft Rule
sudo nft delete rule <inet> <filter> <input> handle <3> nft Operations
Nft Command: Save Current Nft Configuration
sudo nft list ruleset > </etc/nftables.conf> nft Operations
Nft Command: Show Rule Handles
sudo nft --handle --numeric list chain <family> <table> <chain> nft Operations
Nft Command: View Current Nft Configuration
sudo nft list ruleset Suggest a Nft Command
Submit missing workflows, corrections, or verified alternatives for this tool.
FAQ
Coverage: Focused examples for common Nft workflows.
Verified version: current stable LTS.
Verification: Test commands in a disposable workspace and submit notes for edge cases.