From e24da35ee3000d5373056ce58677e02cb878f7f7 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 10 Aug 2017 19:29:15 +0200 Subject: nft.8: Document operations on ruleset People new to nftables and yet unaware of 'list ruleset' and 'flush ruleset' commands have a hard time. Therefore put description of those prominently at the top, even before explaining operations on tables and chains. Since 'export ruleset' is closely related, document it here as well and remove it's sparse description from ADDITIONAL COMMANDS section. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- doc/nft.xml | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 15 deletions(-) diff --git a/doc/nft.xml b/doc/nft.xml index 6c845013..de8c2cb9 100644 --- a/doc/nft.xml +++ b/doc/nft.xml @@ -474,6 +474,78 @@ filter input iif $int_ifs accept + + Ruleset + + + + list + flush + + ruleset + family + + + export + ruleset + format + + + + + The ruleset keyword is used to identify the whole + set of tables, chains, etc. currently in place in kernel. The + following ruleset commands exist: + + + + + + + + Print the ruleset in human-readable format. + + + + + + + + Clear the whole ruleset. Note that unlike iptables, this + will remove all tables and whatever they contain, + effectively leading to an empty ruleset - no packet + filtering will happen anymore, so the kernel accepts any + valid packet it receives. + + + + + + + + Print the ruleset in machine readable format. The + mandatory format parameter + may be either xml or + json. + + + + + + + It is possible to limit list and + flush to a specific address family only. For a + list of valid family names, see ADDRESS FAMILIES above. + + + + Note that contrary to what one might assume, the output generated + by export is not parseable by + nft -f. Instead, the output of + list command serves well for that purpose. + + + Tables @@ -4371,21 +4443,6 @@ add rule nat prerouting tcp dport 22 redirect to :2222 These are some additional commands included in nft. - - export - - Export your current ruleset in XML or JSON format to stdout. - - - Examples: - -% nft export xml -[...] -% nft export json -[...] - - - monitor -- cgit v1.2.3