Add modules to iptables under FC5

Source: Internet
Author: User
Tags rpmbuild
In FC5, add the module iptables-Linux Enterprise Application-Linux server application information. The following is a detailed description. Step 1 download kernel. *. src. rpm
Step 2 download iptables. *. src. rpm directly to www.iptables.org
To install the system, you must select compilation and Development kits.
Install kernel. *. src. rpm to install iptables. *. src. rpm
There are two files in the/usr/src/redhat/SPECS directory.
Rpmbuild-bp -- target $ (uname-m) kernel-2.6.spec
Rpmbuild-bp -- target $ (uname-m) iptables. spec
Cd/usr/src
Mkdir kernels
Cd kernels
Ln-s ../redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686/2.6.15-1.2054 _ FC5-i686
Ln-s/usr/src/redhat/BUILD/iptables // usr/src/iptables
Ln-s/usr/src/kernel/2.6.15-1.2054 _ FC5-i686/usr/src/linux
Cp configs/kernel-2.6.15-i686.config. config
# Uname? R (get 2.6.15-1.2054_FC5)
2.6.15-1.2054 _ FC5
In Makefile, The EXTRAVERSION =-prep
Change to EXTRAVERSION =-1.2054 _ FC5
Start patching
Download patch-o-patch-o-matic-ng-20060511.tar.bz2 from www.iptables.org
Cp file/usr/src/
Tar-xvf patch-o-matic-ng-20060511.tar.bz2
Enter the directory./runme connlimit;./runme ipp2p;./runme u32
./Runme connlimit Error
Go to connlimit/linux.2.6.11/net/ipv4/netfilt/and find Makefile. ladd.
Convert obj-$ (CONFIG_IP_NF_MATCH_STATE) + = ipt_state.o
Change to obj-$ (CONFIG_IP_NF_MATCH_TOS) + = ipt_tos.o
./Runme connlimit succeeded
Go to the/usr/src/linux directory
Cp configs/kernel-2.6.15-i686.config. config
Make menuconfig cannot be entered.
Ignore it and change it to make oldconfig.
It's okay. You can also tell me if I want to create a new module on M. Of course I want it.
Then, press Ctrl + c to exit.
Make M = net/ipv4/netfilt/
Now, the compilation module is finished after a long wait.
Cp net/ipv4/netfilt/ipt_connlimit.ko/lib/modules/2.6.15-1.2054 _ FC5/kernel/net/ipv4/netfilt/Remember to request chmod + x ipt_connlimit.ko
Insmod ipt_connlimit.ko
Lsmod view OK
Use
/Sbin/iptables-a input-s 192.186.1.0/24-p tcp -- syn-m connlimit -- connlimit-above 15-j DROP
OK! Finally, you can! Alas, poor people are poor people.
I don't even know how many days I have to build a module.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.