iptables 添加time 模块
来源:互联网 发布:深圳淘宝开店培训班 编辑:程序博客网 时间:2024/05/20 02:27
需要下载内核源码
linux-2.6.18.tar.bz2
iptables源码
iptables-1.3.5.tar.bz2
内核补丁
patch-o-matic-ng-20080214.tar.bz2
把源码包解压到/usr/src 下
#cd /usr/src
#tar xvfj linux-2.6.18.tar.bz2
#tar xvfj iptables-1.3.5.tar.bz2
#tar xvfj patch-o-matic-ng-20080214.tar.bz2
为了方便,做软连接
#ln -s linux-2.6.18 linux
#ln -s iptables-1.3.5 iptables
更改内核源码Makefile 文件
#vim /usr/src/linux/Makefile
EXTRAVERSION = (当然内核版本)
#cd /usr/src/linux
#make menuconfig
退出(什么也不做。生成.config 文件)
#cd ../patch-o-matic-ng-20080214
#./runme --download
#./runme time
默认回车,提示添加模块按y
#cd /usr/src/linux
#make menuconfig
Networking ----Networking options ----Network packet filtering (replaces ipchains)------Core Netfiler Configuration
Time match support 选中 M
#make modules
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
HOSTCC scripts/conmakehash
HOSTCC scripts/kallsyms
CC scripts/empty.o
HOSTCC scripts/mk_elfconfig
MKELF scripts/elfconfig.h
HOSTCC scripts/file2alias.o
HOSTCC scripts/modpost.o
HOSTCC scripts/sumversion.o
HOSTLD scripts/modpost
HOSTCC scripts/pnmtologo
HOSTCC scripts/bin2c
到这步就可以ctrl +c 终止了
#make modules SUBDIRS=net/ipv4/netfilter
#chmod +x /usr/src/linux/net/ipv4/netfilter/ipt_time.ko
#cp /usr/src/linux/net/ipv4/netfilter/ipt_time.ko /lib/modules/2.6.18-238.el5/kernel/net/ipv4/netfilter/
#depmod -a
编译iptables
#cd /usr/src/iptables
#make KERNEL_DIR=/usr/src/linux
#make install KERNEL_DIR=/usr/src/linux
#cp /usr/src/iptables/extensions/libipt_time.so /lib/iptables
测试
iptables -m time --help
- iptables 添加time 模块
- iptables添加模块
- iptables添加connlimit模块
- iptables的time模块下载(适用于linux 2.6.18.1内核)
- time 模块
- time模块
- time模块
- time模块
- time模块
- time模块
- time模块
- time模块
- time模块
- time模块
- iptables time 时间匹配规则
- iptables整体模块结构图
- 备忘:iptables length模块
- iptables模块介绍:connlimit
- memcache使用 MEMCACHE_COMPRESSED奇怪的问题(乱码问题)。
- ASP与数据库应用
- ffmpeg error C3861: 'UINT64_C': identifier not foun
- jQuery去空格
- 虚拟主机中,不修改IIS设置,在IIS6下运行MVC架构的网站
- iptables 添加time 模块
- http://blog.csdn.net/dojotoolkit/article/details/6280924
- UNIX命令
- HDU-1086 You can Solve a Geometry Problem too 解题报告
- oracle grant 为表给其它用户授权
- 2011网易移动互联网数据报告
- 用W7100,做自己的HTTP服务器
- VMWare的The network bridge on device VMnet0 is not running故障解决
- Log4Net