iptables 深入分析
四表五链
四表:filter , nat, manager, raw
五链: 五个HOOK点的链接,pre_rout, foward, post_rout, in ,out
问题:
内核如何匹配,内核使能
iptable 命令转换,和内核交互
libiptc库和内核交互
最终是转换到hook点的处理函数上来.
match模块被添加到系统的链表中
当iptables 调用命令,会把这个过滤规则添加到过滤表中.
在每个HOOK点用操作表组成了操作链,分别调用表中的匹配和过滤函数.
内和match注册:
xt_register_match
filter表分析
match 模块查找
do_command4
command_match
xtables_find_match
表的插入
insert_entry
iptc_insert_entry <libiptc.h>
libiptc和内核交互
http://blog.chinaunix.net/uid-29732842-id-4975834.html
get_socket
set_socket
网络命名空间相关
struct netns_ipv4
#ifdef CONFIG_NETFILTER
struct xt_table *iptable_filter;
struct xt_table *iptable_mangle;
struct xt_table *iptable_raw;
struct xt_table *arptable_filter;
#ifdef CONFIG_SECURITY
struct xt_table *iptable_security;
#endif
struct xt_table *nat_table;
#endif
iptables 深入分析的更多相关文章
- 25个iptables常用示例
本文将给出25个iptables常用规则示例,这些例子为您提供了些基本的模板,您可以根据特定需求对其进行修改调整以达到期望. 格式 iptables [-t 表名] 选项 [链名] [条件] [-j ...
- iptables 命令记录
安装 原理 基本命令 实践 脚本 1.安装 以centos 7为例子安装 yum install -q -y iptables-services配置 iptables [-t table] comma ...
- iptables 及容器网络分析
本文独立博客阅读地址:https://ryan4yin.space/posts/iptables-and-container-networks/ 本文仅针对 ipv4 网络 iptables 提供了包 ...
- iptables
一.在服务器上打开 22.80.9011端口: iptables -A INPUT -p tcp --dport 9011 -j ACCEPT iptables -A OUTPUT -p tcp -- ...
- 浅谈iptables 入站 出站以及NAT实例
--------------本文是自己工作上的笔记总结,适合的可以直接拿去用,不适合的,适当修改即可!--------------- iptbales默认ACCEPT策略,也称通策略,这种情况下可以做 ...
- Failed to stop iptables.service: Unit iptables.service not loaded.
redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...
- 深入分析Spring 与 Spring MVC容器
1 Spring MVC WEB配置 Spring Framework本身没有Web功能,Spring MVC使用WebApplicationContext类扩展ApplicationContext, ...
- CentOS7安装iptables防火墙
CentOS7默认的防火墙不是iptables,而是firewalle. 安装iptable iptable-service #先检查是否安装了iptables service iptables st ...
- linux iptables常用命令之配置生产环境iptables及优化
在了解iptables的详细原理之前,我们先来看下如何使用iptables,以终为始,有可能会让你对iptables了解更深 所以接下来我们以配置一个生产环境下的iptables为例来讲讲它的常用命令 ...
随机推荐
- Linux 与 BSD
1)Linux 与 BSD 有什么不同? http://linux.cn/article-3186-1.html 2)BSD(Unix)家族 http://blog.csdn.net/cradmin/ ...
- SQLite在php中的接口
sqlite是一种比较轻型的嵌入式数据库,它与 SQL 之间的不同,为什么需要它,以及它的应用程序数据库处理方式.SQLite是一个软件库,实现了自给自足的.无服务器的.零配置的.事务性的 SQL 数 ...
- SQL之DML
DML(Data Manipulation Language)数据操纵语言statements are used for managing data within schema objects. 由D ...
- /dev/null 位桶
把/dev/null看作"黑洞". 它非常等价于一个只写文件. 所有写入它的内容都会永远丢失. 而尝试从它那儿读取内容则什么也读不到. 然而, /dev/null对命令行和脚本都非 ...
- lda:变分的推导
lda,latent diriclet allocation,是一个最基本的bayesian模型.本文要研究lda基于变分的推导方法.意义是重大的. 一.符号的定义 : the number of t ...
- 警惕C#事件使用过程中的GC陷阱
关于C#中的事件,园里已经有大量的文章对其内在实现做过剖析,如果还不甚了解的可以阅读这篇文章 通过Demo来细看C#事件的内在机制 虽然比较早,但非常清楚地展示了事件的内部机制,总结一下就是 1.事件 ...
- Vue vue-resource发送Http请求
vue-resource 1.cnpm install vue-resource --save 2.在main.js中import VueResource from 'vue-resource' 3. ...
- MVC 异常过滤
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- .NET MVC对接POLYV——HTML5播放器播放加密视频
官方参考文档:http://dev.polyv.net/2017/videoproduct/v-playerapi/html5player/html5-docs/ 1.上传视频之前根据自己需要对所上传 ...
- Jmeter的主要元件及元件的执行顺序
一.JMeter的主要元素 1.Test Pan(测试计划) Jmeter中的测试计划包括一个或者一组的测试用例,一个Thread Group可以认为是一个测试用例,一个测试计划中可以包括多个Thre ...