升级内核的方法:
内核下载地址: www.kernel.org
L7的相关文件 http://l7-filter.clearfoundation.com/downloads/start
iptables http://www.netfilter.org
升级内核到2.6.28 并支持L7/string
解压源码包
tar xzf linux-2.6.28.tar.gz
tar xjf iptables-1.4.10.tar.bz2
tar xzf l7-protocols-2009-05-28.tar.gz
tar xzf netfilter-layer7-v2.22.tar.gz
cd linux-2.6.28
make mrproper 清理工作
patch -p1 < /usr/src/netfilter-layer7-v2.22/kernel-2.6.25-2.6.28-layer7-2.22.patch #打上L7补丁
make menuconfig
在
Networking--Networking options--Network packet filtering (replaces ipchains)--Core Netfilter Configuration
把L7和支持 string 等选上
make
make modules
make modules_install
make install
重启系统
#uname -a
Linux localhost.localdomain 2.6.28
编译iptables 支持layer7
cd /usr/src/netfilter-layer7-v2.22/iptables-1.4.3forward-for-kernel-2.6.20forward/
cp libxt_layer7.* /usr/src/iptables-1.4.10/extensions/
上面两步必须操作,这样iptables才能支持,因为新版本的iptables不用打补丁了,直接复制过去即可
cd /usr/src/iptables-1.4.10/
./configure --prefix=/ --with-ksource=/usr/src/linux-2.6.28
make
make install
#iptables -V
iptables v1.4.10
安装协议
cd /usr/src
cd l7-protocols-2009-05-28
make install
#iptables -t mangle -I PREROUTING -m layer7 --l7proto edonkey -j DROP
如没有提示 则无问题
第二种方法:我刚刚测试过
首先确认内核版本: uname -r
例如:[root@localhost iptables-1.4.10]# uname -r
2.6.18-194.el5
这样我从kernel上下载2.6.18的内核
linux-2.6.18.tar.bz2
下载:l7-protocols-2009-05-28 (L7的主程序)
netfilter-layer7-v2.6 (内核的补丁)
内核下载地址: www.kernel.org
L7的相关文件 http://l7-filter.clearfoundation.com/downloads/start
iptables http://www.netfilter.org
解压源码包
tar xzf linux-2.6.18.tar.bz2
tar xjf iptables-1.3.5.tar.bz2
tar xzf l7-protocols-2009-05-28.tar.gz
tar xzf netfilter-layer7-v2.6.tar.gz
cd linux-2.6.18
make mrproper 清理工作
patch -p1 <../netfilter-layer7-v2.6/kernel-2.6.18-layer7-2.6.patc #打上L7补丁(根据内核版本)
make menuconfig
在
Networking--Networking options--Network packet filtering (replaces ipchains)--Core Netfilter Configuration
把L7支持 string 等选上
make modules_prepa
2013年4月28日星期日
扩容/dev/mapper/pve-root
.执行 parted /dev/sdq 输入 print 找到要扩容的盘,应该是/dev/sdq3,检查大小 resizepart 3 100% quit 再检查大小 退出parted 更新物理卷的大小,当然这里前提是使用了LVM pvresize /dev/sda3 lvdis...
-
The Raspberry Pi 4 can drive up to two displays, with a resolution up to 1080p at a 60Hz refresh rate. At 4K resolution, if you connect two...
-
510-01:~$ cat /proc/mdstat Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raidF1] md2 : active raid5 sdj5[1] sdt5[11] sds5[9] sd...
-
核心参数 参数 作用 适用场景 建议值 size 副本数量,决定数据在 OSD 之间的冗余度 2-3 副本保证数据安全 生产环境建议 3 ,测试环境 2 min_size 最小副本数,低于该值时数据不可写 一般设置为 size 的一半 size / 2 向上取整,例如 2...
没有评论:
发表评论