美文网首页
iptables 笔记

iptables 笔记

作者: 闲云野马 | 来源:发表于2019-11-15 14:15 被阅读0次

好文:
https://www.digitalocean.com/community/tutorials/a-deep-dive-into-iptables-and-netfilter-architecture

The Mangle Table

The mangle table is used to alter the IP headers of the packet in various ways. For instance, you can adjust the TTL (Time to Live) value of a packet, either lengthening or shortening the number of valid network hops the packet can sustain. Other IP headers can be altered in similar ways.

This table can also place an internal kernel “mark” on the packet for further processing in other tables and by other networking tools. This mark does not touch the actual packet, but adds the mark to the kernel’s representation of the packet.

关于为什么修改头用 mangle 这个词,这里有解释
https://searchnetworking.techtarget.com/definition/packet-mangling

Packet mangling is the modification of packets at a packet-based network interface before and/or after routing. The term "mangling" is misleading, because to some people it suggests malicious intent. In this context, the term "mangling" refers only to the intentional alteration of the data in a packet header for a specific constructive purpose.

The Raw Table

The iptables firewall is stateful, meaning that packets are evaluated in regards to their relation to previous packets. The connection tracking features built on top of the netfilter framework allow iptables to view packets as part of an ongoing connection or session instead of as a stream of discrete, unrelated packets. The connection tracking logic is usually applied very soon after the packet hits the network interface.

The raw table has a very narrowly defined function. Its only purpose is to provide a mechanism for marking packets in order to opt-out of connection tracking.

Connection tracking is applied very soon after packets enter the networking stack. The raw table chains and some basic sanity checks are the only logic that is performed on packets prior to associating the packets with a connection.

The system checks each packet against a set of existing connections. It will update the state of the connection in its store if needed and will add new connections to the system when necessary. Packets that have been marked with the NOTRACK target in one of the raw chains will bypass the connection tracking routines.

相关文章

  • iptables 安全

    注解;来自某位大神的详解,做个笔记。 iptables防火墙简介 Netfilter/Iptables(以下简称I...

  • CentOS7下防火墙相关

    本文章仅作为个人笔记 iptables相关:(更改完配置需运行/etc/rc.d/init.d/iptables ...

  • iptables 笔记

    好文:https://www.digitalocean.com/community/tutorials/a-dee...

  • iptables学习笔记

    自定义firewall 多个网卡接口 放行特定IP 端口及协议 参考资料 Iptables (简体中文)

  • iptables学习笔记

    iptables需要处理两个维度的信息: 在什么时候应用配置,这便是iptables中的链(chain),对应于n...

  • iptables学习笔记

    iptables防火墙简介 基于包过滤防火墙 OSI 二三四层 iptables+squid实现7层过滤 Netf...

  • iptables学习笔记

    Iptable Study 最近经常碰到iptables的问题。现在找个时间专门研究一下。 iptables是什么...

  • iptables 入门笔记

    基本概念 数据流动的链(chain) 数据包在 iptables 里经过的链如下图所示: 在路由决策时,如果目标 ...

  • iptables学习笔记

    参考 第九章、防火墙与 NAT 服务器 不同Linux内核,有不同的报文过滤软件 Linux Kernal 2.0...

  • iptables

    iptables -F iptables -X iptables -Z service iptables save...

网友评论

      本文标题:iptables 笔记

      本文链接:https://www.haomeiwen.com/subject/whvjictx.html