Skip to content

netfilter ​


简介 ​

logo
详见官网
wiki介绍

过滤流程图 ​

<object data="netfilter/Netfilter-packet-flow.svg" type="image/svg+xml"></object>
图片引用自wiki:https://en.wikipedia.org/wiki/Netfilter#/media/File:Netfilter-packet-flow.svg

主要功能 ​

  • 无状态过滤IP报文
  • 有状态过滤IP报文
  • IP和端口转换

钩子点 ​

钩子点描述
NF_IP_PRE_ROUTINGThis hook will be triggered by any incoming traffic very soon after entering the network stack. This hook is processed before any routing decisions have been made regarding where to send the packet.
NF_IP_LOCAL_INThis hook is triggered after an incoming packet has been routed if the packet is destined for the local system.
NF_IP_FORWARDThis hook is triggered after an incoming packet has been routed if the packet is to be forwarded to another host.
NF_IP_LOCAL_OUTThis hook is triggered by any locally created outbound traffic as soon it hits the network stack.
NF_IP_POST_ROUTINGThis hook is triggered by any outgoing or forwarded traffic after routing has taken place and just before being put out on the wire.

默认规则表 ​