学习netfilter/iptables的使用
来源:互联网 发布:惊吓猫走红网络 编辑:程序博客网 时间:2024/05/21 08:03
学习netfilter/iptables的使用
层次结构:
tables
chains (build-in / user-defined)
rules
规则指定了包和目标(target)。
目标就是对匹配的包的动作。
目标可以是同一表内的自定义链(user-defined chain),
或者是ACCEPT, DROP, QUEUE, 或RETURN。
未匹配的包进行链中下一规则的检查;
而匹配的包的目标决定了下一条要检查的规则。
RETURN表示返回到前一链的下一条规则,即从该链的检查中返回。
如果一条内建链检查完毕,链的策略目标(policy)决定包的去向。
有三个表:filter, nat, mangle.
filter: 缺省表。内建链有
INPUT (for packets coming into the box itself),
FORWARD (for packets being routed through the box), and
OUTPUT (for locally-generated packets).
nat:新建连接时检查。三个内建链
PREROUTING (for altering packets as soon as they come in),
OUTPUT (for altering locally-generated packets before routing),
POSTROUTING (for altering packets as they are about to go out).
mangle:用来更改特殊的包。内建链
PREROUTING (for altering incoming packets before routing)
OUTPUT (for altering locally-generated packets before routing),
INPUT (for packets coming into the box itself),
FORWARD (for altering packets being routed through the box),
POSTROUTING (for altering packets as they are about to go out).
表的名字表示对包的处理动作,链的名字表示包所处的位置。
如到本机的包经过:PREROUTING, INPUT
本机向外发包:OUTPUT, POSTROUTE
转发的包:PREROUTING, FORWARD, POSTROUTE
其实将所有动作集中到一张表中也是可以的。
层次结构:
tables
chains (build-in / user-defined)
rules
规则指定了包和目标(target)。
目标就是对匹配的包的动作。
目标可以是同一表内的自定义链(user-defined chain),
或者是ACCEPT, DROP, QUEUE, 或RETURN。
未匹配的包进行链中下一规则的检查;
而匹配的包的目标决定了下一条要检查的规则。
RETURN表示返回到前一链的下一条规则,即从该链的检查中返回。
如果一条内建链检查完毕,链的策略目标(policy)决定包的去向。
有三个表:filter, nat, mangle.
filter: 缺省表。内建链有
INPUT (for packets coming into the box itself),
FORWARD (for packets being routed through the box), and
OUTPUT (for locally-generated packets).
nat:新建连接时检查。三个内建链
PREROUTING (for altering packets as soon as they come in),
OUTPUT (for altering locally-generated packets before routing),
POSTROUTING (for altering packets as they are about to go out).
mangle:用来更改特殊的包。内建链
PREROUTING (for altering incoming packets before routing)
OUTPUT (for altering locally-generated packets before routing),
INPUT (for packets coming into the box itself),
FORWARD (for altering packets being routed through the box),
POSTROUTING (for altering packets as they are about to go out).
表的名字表示对包的处理动作,链的名字表示包所处的位置。
如到本机的包经过:PREROUTING, INPUT
本机向外发包:OUTPUT, POSTROUTE
转发的包:PREROUTING, FORWARD, POSTROUTE
其实将所有动作集中到一张表中也是可以的。
- 学习netfilter/iptables的使用
- Netfilter/Iptables学习(综合整理)
- Netfilter和iptables学习总结
- iptables学习笔记--Netfilter的报文转发流程
- linux netfilter/iptables 架构分析及nelink的使用
- Netfilter与iptables的关系
- linux下的Netfilter&iptables
- netfilter & iptables
- iptables、netfilter
- Netfilter/iptables学习笔记1--基础介绍
- netfilter/iptables学习总结(一)
- 使用netfilter/iptables配置防火墙(ZT)
- 如何使用netfilter/iptables构建防火墙
- 如何使用netfilter/iptables构建防火墙
- 如何使用netfilter/iptables构建防火墙
- 如何使用netfilter/iptables构建防火墙
- 如何使用netfilter/iptables构建防火墙
- Linux下netfilter/iptables使用(V3.0)
- 善于认知自己--读周国平有感
- 关于软件文档 这些你知道吗?
- Windows Storage Server 2003 的 10 大优点
- 配置安全的Apache,配置带SSL加密的Apache(mod_ssl+open_ssl),自我签证的SSL证书的制作与发放
- I like small font..
- 学习netfilter/iptables的使用
- 试用iptables
- 如期完成五子棋1.0正式版
- struts标签的disable问题
- 丁磊:那时候我们除了会写软件 什么也不会做
- 看看令人作呕的韩国人
- Linux 内核级后门的原理和简单实战
- ASP模版与生成HTML文件代码。
- sth. on XML