poka.sh

Docs

NFT

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

nftables Preview.

At a glance

Purpose An nftables ruleset (.nft): tables, chains, sets and maps for the Linux packet filter.
Extensions .nft
Poka parser poka-nftables
Viewer poka-metadata-card-viewer
Depth tier Metadata card (see Depth tiers)
Breadth tier B4 Summary (see Breadth tiers)

How much Poka reads

B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-nftables/src/main.rs (346 lines) and plugin.json. No unit tests or tests/samples.rs; the corpus has no .nft sample. Covers .nft. The card counts tables, chains, sets, maps and counters, quotas, flowtables and limits, hooks, rule lines (by heuristic), the top verdicts, flush statements and includes. Judgement: B4: the content is summarised by counts, but the entries themselves are not shown.

What Poka does not read

  • Rules are not listed or explained
  • Rule lines are counted by heuristic
  • Set elements are not shown
  • Includes are not followed

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • Linx.NFT (linx) (candidate; MIT; Elixir; https://linx.hexdocs.pm/Linx.NFT.html) — Parses nft text syntax (parse/2, parse_file/1) into a ruleset struct; covers about 85% of the syntax. Licence taken from the Hex package page for linx.
  • nftables (nft, libnftables) (candidate; licence unconfirmed; C; https://www.netfilter.org/projects/nftables/) — Reference implementation that compiles nft rulesets; page links GPL terms but does not name a version. Language not stated on the page.
  • nff (reference; GPL-3.0; unknown; https://github.com/NotAShelf/nff) — copyleft; Experimental nftables formatter, archived May 2025; a search snippet describes a lexer/CST parser but the GitHub page does not.

Sources

  • parsers/poka-nftables/src/main.rs
  • parsers/poka-nftables/plugin.json