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删除文件后磁盘空间未释放的问题
很可能是该文件还被其它进程使用. 使用: lsof | grep deleted | grep $FILE_NAME 可以看到正使用该文件的进程,将之kill即可.也可以查看进程来验证: ls -l ...
- javascript DES加密
研究联通wifi登陆中,发现了一个名为"encryption.js"的文件.这个文件一看即知是加密过的,首先自己尝试去手工解密,看到太烦琐了,忽然想到网上有js解密工具,遂决定用来 ...
- osm2pgsql导入少字段
Explanation: osm2pgsql imports normally the data in a static database schema. The tags without a cor ...
- $.post()参数及返回值
JQuery中的$.post()函数 先看一个例子:$.post("adduser.ashx", { "name": name, "sex" ...
- Part3_lesson3---ARM伪指令学习
1.ARM机器码 对elf格式的文件进行反汇编可得到相应汇编文件的机器码: arm-linux-objdump -D -S start.elf 机器码的解析,可以参考文件ARM Architectur ...
- 利用URL重写实现Session跟踪
Servlet规范中引入了一种补充的会话管理机制,它允许不支持Cookie的浏览器也可以与WEB服务器保持连续的会话.这种补充机制要求在响应消息的实体内容中必须包含下一次请求的超链接,并将会话标识号作 ...
- 基于Ajax的文件上传使用FileInput插件(使用谷歌翻译作者的原文,大致意思是对的,自己把握)
bootstrap-fileinput 说明文档:http://plugins.krajee.com/file-input 有许多人希望学习使用bootstrap-fileinput jQuery插件 ...
- Socket网络通讯
网络编程 使用C#进行网络编程时,通常都需要用到System.Net命名空间.System.Net.Sockets命名空间和System.Net.Mail命名空间: 1. System.Net命名空间 ...
- 以太坊系列之七: p2p模块的dial--以太坊源码学习
dial.go阅读手记 dial.go是负责和peer建立连接关系的地方,主要是实现 type dialer interface { /* peers已经有的结点 */ newTasks(runnin ...
- android android studio
android studio 一.安装及步骤: Android Studio安装: java jdk安装: jdk环境变量配置: 二.遇到的问题: 1.缺少jvm或java jdk路径不对,请指定正 ...