OS Manuals

/usr/bin/nft

Netfilter tables userspace tools

From nftables 1.1.7-r0 (os), captured 2026-11-05 by running nft --help (exit 0). permalink

Usage: /usr/bin/nft [ options ] [ cmds... ]

Options (general):
  -h, --help                      Show this help
  -v, --version                   Show version information
  -V                              Show extended version information

Options (ruleset input handling):
  -f, --file <filename>           Read input from <filename>
  -D, --define <name=value>       Define variable, e.g. --define foo=1.2.3.4
  -i, --interactive               Read input from interactive CLI
  -I, --includepath <directory>   Add <directory> to the paths searched for include files. Default is: /etc
  -c, --check                     Check commands validity without actually applying the changes.
  -o, --optimize                  Optimize ruleset

Options (ruleset list formatting):
  -a, --handle                    Output rule handle.
  -s, --stateless                 Omit stateful information of ruleset.
  -t, --terse                     Omit contents of sets.
  -S, --service                   Translate ports to service names as described in /etc/services.
  -N, --reversedns                Translate IP addresses to names.
  -u, --guid                      Print UID/GID as defined in /etc/passwd and /etc/group.
  -n, --numeric                   Print fully numerical output.
  -y, --numeric-priority          Print chain priority numerically.
  -p, --numeric-protocol          Print layer 4 protocols numerically.
  -T, --numeric-time              Print time values numerically.

Options (command output formatting):
  -e, --echo                      Echo what has been added, inserted or replaced.
  -j, --json                      Format output in JSON
  -d, --debug <level [,level...]> Specify debugging level (scanner, parser, eval, netlink, mnl, proto-ctx, segtree, all)
Options (22)
OptionDescriptionSource
-h, --helpShow help message and all options.help + man
-v, --versionShow version informationhelp + man
-VShow long version information, including compile-time configuration.help + man
-f, --file filenameRead input from <filename>help + man
-D, --define name=valueDefine variable, e.g. --define foo=1.2.3.4help + man
-i, --interactiveRead input from an interactive readline CLI.help + man
-I, --includepath directoryAdd the directory directory to the list of directories to be searched for included files.help + man
-c, --checkCheck commands validity without actually applying the changes.help + man
-o, --optimizeOptimize your ruleset.help + man
-a, --handleShow object handles in output.help + man
-s, --statelessOmit stateful information of rules and stateful objects.help + man
-t, --terseOmit contents of sets from output.help + man
-S, --serviceTranslate ports to service names as described in /etc/services.help + man
-N, --reversednsTranslate IP address to names via reverse DNS lookup.help + man
-u, --guidTranslate numeric UID/GID to names as defined by /etc/passwd and /etc/group.help + man
-n, --numericPrint fully numerical output.help + man
-y, --numeric-priorityDisplay base chain priority numerically.help + man
-p, --numeric-protocolDisplay layer 4 protocol numerically.help + man
-T, --numeric-timeShow time, day and hour values in numeric format.help + man
-e, --echoWhen inserting items into the ruleset using add, insert or replace commands, print notifications just like nft monitor.help + man
-j, --jsonFormat output in JSON.help + man
-d, --debug levelEnable debugging output. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.