LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nft-monitor

displays real-time changes to the nftables firewall configuration

TLDR

Watch every change to the ruleset as it happens
$ sudo nft monitor
copy
Watch rule changes only
$ sudo nft monitor rules
copy
Watch set and element changes only
$ sudo nft monitor sets
copy
Watch only what is added
$ sudo nft monitor new rules
copy
Watch only what is removed
$ sudo nft monitor destroy rules
copy
Emit JSON so a program can consume the stream
$ sudo nft -j monitor
copy
Follow packets through the ruleset, once a rule has set nftrace
$ sudo nft monitor trace
copy

SYNOPSIS

nft monitor [object]

DESCRIPTION

nft monitor displays real-time changes to the nftables firewall configuration. It subscribes to netlink notifications and shows when rules, sets, chains, or tables are added, modified, or deleted.Events are displayed as they occur, showing the exact nftables commands that would recreate the change. This is useful for debugging firewall behavior, auditing changes, or understanding how other tools modify the firewall.Without a filter argument, all nftables events are shown. Specifying an object type (rules, sets, etc.) filters the output to only those changes.

PARAMETERS

rules

Monitor only rule changes
sets
Monitor only set and element changes
tables
Monitor only table changes
chains
Monitor only chain changes
-j, --json
Output events in JSON format

INSTALL

sudo apt install nftables
copy
sudo dnf install nftables
copy
sudo pacman -S nftables
copy
sudo apk add nftables
copy
sudo zypper install nftables
copy
brew install nftables
copy
nix profile install nixpkgs#nftables
copy

CAVEATS

Requires root privileges to access netlink notifications. The monitor runs continuously until interrupted with Ctrl+C. High-frequency changes (like connection tracking updates) may produce substantial output. Only shows changes made while monitoring is active.

SEE ALSO

nft(8), iptables(8), conntrack(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid