|
|
195495 |
From 7f5707d93a62cf7474d94e038188a0a8ae2924e7 Mon Sep 17 00:00:00 2001
|
|
|
195495 |
From: Phil Sutter <phil@nwl.cc>
|
|
|
195495 |
Date: Wed, 19 May 2021 13:12:48 +0200
|
|
|
195495 |
Subject: [PATCH] doc: nft.8: Extend monitor description by trace
|
|
|
195495 |
|
|
|
195495 |
Briefly describe 'nft monitor trace' command functionality.
|
|
|
195495 |
|
|
|
195495 |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
195495 |
(cherry picked from commit 2acf8b2caea19d8abd46d475a908f8d6afb33aa0)
|
|
|
195495 |
---
|
|
|
195495 |
doc/nft.txt | 25 ++++++++++++++++++++++---
|
|
|
195495 |
1 file changed, 22 insertions(+), 3 deletions(-)
|
|
|
195495 |
|
|
|
195495 |
diff --git a/doc/nft.txt b/doc/nft.txt
|
|
|
195495 |
index 2642d8903787f..7b3c70d82a127 100644
|
|
|
195495 |
--- a/doc/nft.txt
|
|
|
195495 |
+++ b/doc/nft.txt
|
|
|
195495 |
@@ -805,13 +805,26 @@ These are some additional commands included in nft.
|
|
|
195495 |
MONITOR
|
|
|
195495 |
~~~~~~~~
|
|
|
195495 |
The monitor command allows you to listen to Netlink events produced by the
|
|
|
195495 |
-nf_tables subsystem, related to creation and deletion of objects. When they
|
|
|
195495 |
+nf_tables subsystem. These are either related to creation and deletion of
|
|
|
195495 |
+objects or to packets for which *meta nftrace* was enabled. When they
|
|
|
195495 |
occur, nft will print to stdout the monitored events in either JSON or
|
|
|
195495 |
native nft format. +
|
|
|
195495 |
|
|
|
195495 |
-To filter events related to a concrete object, use one of the keywords 'tables', 'chains', 'sets', 'rules', 'elements', 'ruleset'. +
|
|
|
195495 |
+[verse]
|
|
|
195495 |
+____
|
|
|
195495 |
+*monitor* [*new* | *destroy*] 'MONITOR_OBJECT'
|
|
|
195495 |
+*monitor* *trace*
|
|
|
195495 |
+
|
|
|
195495 |
+'MONITOR_OBJECT' := *tables* | *chains* | *sets* | *rules* | *elements* | *ruleset*
|
|
|
195495 |
+____
|
|
|
195495 |
|
|
|
195495 |
-To filter events related to a concrete action, use keyword 'new' or 'destroy'.
|
|
|
195495 |
+To filter events related to a concrete object, use one of the keywords in
|
|
|
195495 |
+'MONITOR_OBJECT'.
|
|
|
195495 |
+
|
|
|
195495 |
+To filter events related to a concrete action, use keyword *new* or *destroy*.
|
|
|
195495 |
+
|
|
|
195495 |
+The second form of invocation takes no further options and exclusively prints
|
|
|
195495 |
+events generated for packets with *nftrace* enabled.
|
|
|
195495 |
|
|
|
195495 |
Hit ^C to finish the monitor operation.
|
|
|
195495 |
|
|
|
195495 |
@@ -835,6 +848,12 @@ Hit ^C to finish the monitor operation.
|
|
|
195495 |
% nft monitor ruleset
|
|
|
195495 |
---------------------
|
|
|
195495 |
|
|
|
195495 |
+.Trace incoming packets from host 10.0.0.1
|
|
|
195495 |
+------------------------------------------
|
|
|
195495 |
+% nft add rule filter input ip saddr 10.0.0.1 meta nftrace set 1
|
|
|
195495 |
+% nft monitor trace
|
|
|
195495 |
+------------------------------------------
|
|
|
195495 |
+
|
|
|
195495 |
ERROR REPORTING
|
|
|
195495 |
---------------
|
|
|
195495 |
When an error is detected, nft shows the line(s) containing the error, the
|
|
|
195495 |
--
|
|
|
195495 |
2.33.0
|
|
|
195495 |
|