1. Netfilter组件图
https://en.wikipedia.org/wiki/Netfilter
其中:
etables作用于数据链路层,arptables针对ARP, iptables/ip6tables针对IP层。
nftables 是新的包过滤组件. nft
是相对应的新的用户态组件,用于替换etables,arptables,iptables,ip6tables.
2. Netfilter包过滤流程图
展示了链路层与网络层的包过滤点。
以常用的网络层为例:
3.对应的内核处理函数
参考:
https://en.wikipedia.org/wiki/Netfilter
Nftables - Packet flow and Netfilter hooks in detail [Thermalcircle.de]