Inside Netfilter and iptables: How Linux Filters Packets with Hooks and Tables
Netfilter, the Linux kernel’s packet‑processing framework, uses a series of hook points and the NF_HOOK macro to let user‑space tools like iptables register callback functions that inspect, modify, or drop packets, with detailed structures for tables, chains, rules, priorities, and connection tracking.
