Iptables implements layer-7 Filtering

Source: Internet
Author: User

Software Package

L7-protocols-2009-05-28.tar.gz

Linux-2.6.28.10.tar.gz

Netfilter-layer7-v2.22.tar.gz

Iptables-1.4.6.tar.bz2

Extract kernel source code and netfilter-L7 source code

[[Email protected] ~] # Tar linux-2.6.28.10.tar.gz-C/usr/src/

[[Email protected] ~] # Tar netfilter-layer7-v2.22.tar.gz-C/usr/src/

[[Email protected] ~] #


Compile the kernel

[[Email protected] Linux] # cp/boot/config-2.6.18-308.el5. config

[[Email protected] Linux] # Make menuconfig

Select order

Networking support ---> networking options ---> network packet filtering framework (netfilter) --->

Core netfilter configuration --->

<M> netfilter Connection Tracking Support

<M> "layer7" Match support

Compile

[[Email protected] Linux] # Make

[[Email protected] Linux] # Make modules_install

[[Email protected] Linux] # make install

View the kernel version after restart

[[Email protected] ~] # Uname-R

2.6.28.10-L7

[[Email protected] ~] #

Install the new iptables

[[Email protected] ~] # Rpm-e iptables-ipv6 iptables -- nodeps

Warning:/etc/sysconfig/iptables-config saved as/etc/sysconfig/iptables-config.rpmsave

[[Email protected] ~] #

[[Email protected] ~] # Tar iptables-1.4.6.tar.bz2-C/usr/src/

[[Email protected] ~] # Cd/usr/src/iptables-1.4.6/extensions/

[[Email protected] extensions] #

[[Email protected] netfilter-layer7-v2.22] # cp iptables-1.4.3forward-for-kernel-2.6.20forward/libxt_layer7 ../iptables-1.4.6/extensions/

[[Email protected] netfilter-layer7-v2.22] #

[[Email protected] SRC] # cd iptables-1.4.6/

[[Email protected] iptables-1.4.6] #

[[Email protected] iptables-1.4.6] #./configure -- prefix =/usr/-- With-ksource =/usr/src/Linux

[[Email protected] iptables-1.4.6] # Make

[[Email protected] iptables-1.4.6] # make install

[[Email protected] iptables-1.4.6] #

Install layer-7

[[Email protected] ~] # Tar xf l7-protocols-2009-05-28.tar.gz

[[Email protected] ~] # Cd l7-protocols-2009-05-28

[[Email protected] l7-protocols-2009-05-28] # make install

Mkdir-P/etc/l7-protocols

CP-R */etc/l7-protocols

[[Email protected] l7-protocols-2009-05-28] #

Prohibit QQ

Iptables-a forward-s 10.10.1.0/24-M layer7 -- l7proto QQ-J Drop



Iptables implements layer-7 Filtering

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.