The nft
command
List Rules
nft list ruleset
Trace All Trafiic
nft add chain filter trace_chain { type filter hook prerouting priority -301\; }
nft add rule filter trace_chain meta nftrace set 1
nft monitor trace
nft delete chain filter trace_chain
Configuration
https://francis.begyn.be/blog/nixos-home-router is a great example if you are familiar with iptables, but note that you can name the tables and chains differently. https://pavluk.org/blog/2022/01/26/nixos_router.html is another more complicated setup.