Linux command
nft-monitor 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo nft monitor
Example
sudo nft monitor rules
Example
sudo nft monitor sets
Example
sudo nft -j monitor
说明
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.
参数
- 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
FAQ
What is the nft-monitor command used for?
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.
How do I run a basic nft-monitor example?
Run `sudo nft monitor` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does rules do in nft-monitor?
Monitor only rule changes