升级内核的方法:
内核下载地址: 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日星期日
在PVE使用虚拟 USB 存储设备 + ARPL 引导 DSM
部分内容来自: https://blog.myds.cloud/archives/synoboot-usb-image-in-pve-virtual-machine.html 虚拟机建好之后,打开配置文件 nano /etc/pve/qemu-server/100.conf ...
-
什么是apt-get apt-get是一条 linux命令 ,适用于deb包管理式的 操作系统 ,主要用于自动从互联网的 软件 仓库中搜索、安装、升级、 卸载 软件或操作系统。 apt-get命令一般需要 root权限 执行,所以一般跟着sudo命令 例 su...
-
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...
-
https://mlapp.cn/376.html 步骤开始 成功登陆到树莓派的 SSH 后,在拉取镜像之前,我们还需要进行一些额外的工作: 1.打开网卡混杂模式 sudo ip link set eth0 promisc on 2.创建网络 (...
没有评论:
发表评论