iptables 默认表名是filter,其他表还有nat、raw、mangle。 iptables -A -p tcp -j ACCEPT 等价于 iptables -A filter -p tcp -j ACCEPT ebtablesebtables的配置分为表、链和规则三级。 1. 表 表是内置且固定的,共有三种: filter, nat, broute,用-t选项指定。最常用的就是filter了,所以不设-t时默认就是这个表。nat用于地址转换,broute用于以太网桥。 2. 链 链有内置和自定义两种 。不同的表内置的链不同,这个从数据包的流程图中就可以看出来。所谓自定义的链也是挂接在对应的内置链内的,使用-j让其跳转到新的链中。 3. 规则 每个链中有一系列规则,每个规则定义了一些过滤选项。每个数据包都会匹配这些项,一但匹配成功就会执行对应的动作。 所谓动作,就是过滤的行为了。有四种,ACCEPT,DROP,RETURN和CONTINUE。常用的就是ACCEPT和DROP https://linux.die.net/man/8/ebtablesCONTINUE means the next rule has to be checked. This can behandy, f.e., to know how many frames pass a certain point in the chain, to log those frames or to apply multiple targets on a frame.
RETURN means stoptraversing this chain and resume at the next rule in the previous (calling)
iptables & ebtables 默认表名
最新推荐文章于 2024-07-26 10:07:20 发布