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为例来讲讲它的常用命令 ...
随机推荐
- 黑盒测试实践-小组任务分配和安排-Day01
实践作业2:黑盒测试实践 小组成员 组长:华同学 成员:覃同学.沈同学.刘同学.郭同学.穆同学 任务分解 任务1:分析系统需求 参考软件需求规格说明书模板描述系统需求.如果系统功能特别多,特别复杂,则 ...
- rest 参数和扩展运算符
rest 参数和扩展运算符 rest 参数的形式为 ...变量名:扩展运算符是三个点 .... rest 参数 function add(...values) { console.log(values ...
- Install zlib/libpng/jpeg/freetype/libgd/GD on Mavericks即mac10.9(转)
转自:http://wangqinhu.com/install-gd-on-mavericks/ Various applications depend on library GD, however, ...
- css总结10:父标签没有定义高度,盒子异常移动
1 问题:在父标签没有定义高度的情况下,嵌套的盒子浮动后,父标签下面的元素发生位置错误. 2 解决方法: 2.1(大厂网页常用方法) 添加额外元素: 即:父标签下添加一个元素(.clearfix),去 ...
- python核心编程第5章课后题答案
5-8Geometry import math def sqcube(): s = float(raw_input('enter length of one side: ')) print 'the ...
- Highway Networks(高速路神经网络)
Rupesh Kumar Srivastava (邮箱:RUPESH@IDSIA.CH)Klaus Greff (邮箱:KLAUS@IDSIA.CH)J¨ urgen Schmidhuber (邮箱: ...
- P - 区间与其他数互质数的个数 HDU - 4777
Rabbit Kingdom Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
- C# 接口(3)
这么半天说了如何使用,实现接口.相信也都发现了接口和抽象类很多相似的地方. 但是! 这两个根本就是不一样的. 抽象类 : ...
- 强制json格式
- HTML中      等6种空白空格