Networking & Firewall (Ss/Netstat/Iptables/Nftables/Curl)
Track down those silent packet drops in your firewall
đź§© The Challenge
You’re staring at a service that isn’t responding, but the logs are clean and the port is open. It’s enough to make you want to throw your monitor out the window because the firewall is clearly eating packets without telling you why.
đź’ˇ The Fix
Use the nftables trace feature to see exactly which rule is dropping your traffic in real time. It saves you from guessing which chain is being a jerk.
nft add table inet trace_table
nft add chain inet trace_table trace_chain { type filter hook prerouting priority -500 \; }
nft add rule inet trace_table trace_chain meta nftrace set 1
nft monitor trace
⚙️ Why It Works
Setting nftrace to 1 tells the kernel to log every decision it makes for a specific packet. It dumps the full path of the packet through your ruleset so you can see the exact drop point.
🚀 Pro-Tip: Don’t forget to delete the trace table after you finish debugging, otherwise your kernel logs will get absolutely hammered.
Linux Tips & Tricks | © ngelinux.com | 11/26/2026
