阅读 100

netfilter 和一般网络中的数据包流


如上图所示,netfilter实际上既可以在L2层过滤,也可以在L3层过滤

所以在网桥中一般会有下面的参数,即不让iptables对bridge的数据进行处理:

cat >> /etc/sysctl.conf <

如果net.bridge.bridge-nf-call-iptables=1,则需要iptables对bridge的数据进行处理,也就意味着二层的网桥在转发包时也会被iptables的FORWARD规则所过滤,这样就会出现L3层的iptables rules去过滤L2的帧的问题
(packets don‘t cross nat table twice, In the bridging process, you don’t know the outgoing interface so the previous rule doesn’t work. He needs the interface because he’s using MASQUERADE. In the routing process, the packets go to iptables but they never cross NAT tables because the packet already crossed the table in the bridging process.)
所以关于dnat、snat的规则将失效,如

原文:https://www.cnblogs.com/smlile-you-me/p/14961673.html

文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐