Chinaunix首页 | 论坛 | 博客
  • 博客访问: 407713
  • 博文数量: 48
  • 博客积分: 764
  • 博客等级: 上士
  • 技术积分: 1133
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-17 13:29
文章分类

全部博文(48)

文章存档

2014年(5)

2013年(34)

2012年(9)

分类: LINUX

2013-09-06 17:43:50

###References
##Pablo Neira Ayuso -- main developer of netfilter.
Netfilter’s connection tracking system

##Linux kernel networking implemention and theory
Chapter 9 Netfilter


###Why netfilter existed?
It was started in 1998 by Rusty Russell.
The netfilter subsystem provides a framework that enables registering callbacks in various points (netfilter hooks) in the packet
traversal in the network stack and performing various operations on packets, such as changing addresses or ports,
dropping packets, logging, and more.

###How can netfilter do?
Packet selection (iptables)

Packet filtering
NAT
Packet mangling (modifying the contents of packet headers before or after routing)
Connection tracking
Gathering network statistics(origin hwf-sqos is based on this functionalities.)

###What consist netfilter?
In enssience, Nefilter is just 5 hooks frameworks.
More details:
          --->PRE------>[ROUTE]------>FWD---------->POST------>
              Conntrack    |       Mangle  ^    Mangle
              Mangle         |       Filter      |    NAT (Src)
              NAT (Dst)     |                     |    Conntrack
              (QDisc)         |               [ROUTE]
                                   v                   |
                             IN Filter       OUT Conntrack
                                   |  Conntrack ^  Mangle
                                   |  Mangle      |  NAT (Dst)
                                   v                   |  Filter

###What's new in netfilter? xtables2 nftables 
 We try to explain the whole things about linux kernel netfilter module.

 
conntrack  在netfilter这个大盒子,是作为基础存在的。

NAT 依赖 conntrack

nf_conntrack_in prerouting
nf注册
nf_register_hooks
nf_register_hook

nf conntrack init
module_init(nf_conntrack_L3proto_init)
阅读(2220) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~