日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

加点自已内容的新内核下L7-FILTER的应用实例!

發(fā)布時(shí)間:2023/12/10 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 加点自已内容的新内核下L7-FILTER的应用实例! 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
加點(diǎn)自已內(nèi)容的新內(nèi)核下L7-FILTER的應(yīng)用實(shí)例!

轉(zhuǎn)載自:如下BLOG
[url]http://pc100.blogbus.com/index.html[/url]

本人實(shí)驗(yàn)的環(huán)境:
RED HAT LINUX AS4 (KERNEL 2.6.9)
1.下載
linux-2.6.13.tar.bz2
iptables-1.3.3.tar.bz2
patch-o-matic-ng-20050925.tar.bz2
netfilter-layer7-v2.0-beta.tar.gz
l7-protocols-2005-09-12.tar.gz
分別解壓到/usr/local/src 下面
/sbin/lspci >> /root/hardward.conf
cat /proc/cpuinfo >> /root/hardward.conf
cd /usr/local/src/patch-o-matic-ng-20050925
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme time
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme ipv4options
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme psd
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme mport
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme ipp2p
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme quota
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme comment
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme connlimit
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme iprange
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme nth
KERNEL_DIR=/usr/local/src/linux-2.6.13 IPTABLES_DIR=/usr/local/src/iptables-1.3.3 ./runme geoip
cd /usr/local/src/linux-2.6.13
patch -p1 < /usr/local/src/netfilter-layer7-v2.0-beta/kernel-2.6.13-layer7-2.0.patch
cd /usr/local/src/iptables-1.3.3
patch -p1 < /usr/local/src/netfilter-layer7-v2.0-beta/iptables-layer7-2.0.patch
cd /usr/local/src/linux-2.6.13
make menuconfig
make dep #可選(make by rickyfang)
make all
make modules_install
(如果按照此操作,可能導(dǎo)致KERNEL沒(méi)有加載成功,也就是提示找不到.CONFIG文件,故還要運(yùn)行make,也許原作者的make all是此作用,但我用不行的!)
cp /usr/local/src/linux-2.6.13/arch/i386/boot/bzImage?? /boot/vmlinuz-2.6.13
su -
/sbin/depmod -a
mkinitrd /boot/initrd-2.6.13.img 2.6.13

cd /usr/local/src/iptables-1.3.3
chmod +x extensions/.layer7-test
export KERNEL_DIR=/usr/local/src/linux-2.6.13
export IPTABLES_DIR=/usr/local/src/iptables-1.3.3
make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin &&
make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install
#make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin MANDIR=/usr/share/man install

安裝l7-filter協(xié)議文件:
cd /usr/local/src/l7-protocols-2005-09-12
make install
[root@ns grub]# vi grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:??You have a /boot partition.??This means that
#??????????all kernel and initrd paths are relative to /boot/, eg.
#??????????root (hd0,0)
#??????????kernel /vmlinuz-version ro root=/dev/hda2
#??????????initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat AS By RickyFang??(2.6.13)
????????root (hd0,0)
????????kernel /vmlinuz-2.6.13 ro root=LABEL=/ rhgb quiet
????????initrd /initrd-2.6.13.img
上面的做完,并不能實(shí)現(xiàn)新內(nèi)核的應(yīng)用,以及IPTABLES子系統(tǒng)IPP2P的應(yīng)用,所參考的文中原作者并沒(méi)有改變GRUB的設(shè)置,故而造成了,實(shí)驗(yàn)并不成功,后來(lái),我改動(dòng)了GRUB.CONF,并重啟系統(tǒng),重新進(jìn)入編譯好的2.6.13的內(nèi)核,成功實(shí)現(xiàn)IPTABLES命令的應(yīng)用!!!

轉(zhuǎn)載于:https://blog.51cto.com/rickyfang/127465

總結(jié)

以上是生活随笔為你收集整理的加点自已内容的新内核下L7-FILTER的应用实例!的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。