Use iptables to block Intranet btsoftware (1)

Source: Internet
Author: User

IptablesVery powerful. Let's take a look at one of the examples.

My network is like this! One FC3 instance and three win2000 instances form a LAN! All four machines are connected to a m vswitch. On FC3, two NICs eth0 are connected to the Internet, and adsl eth1 are connected to the vswitch. FC3 is used for nat and three win2000 instances are connected to the Internet! Because the bandwidth of ADSL is inherently slow, it would be even slower if someone uses BT in the Intranet! I found all the materials! Decide to block the btsoftware from the Intranet!

To use the cvs version, run the iptables command at ftp://ftp.netfilter.org/pub/iptables/snapshot/to download the extension package for iptables.

Patch-o-matic-ng has been downloaded in ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/ as well.

Copy patch-o-matic-ng-20041231.tar.bz2 and the iptables-1.3.0-20041231.tar.bz2 to the/usr/local/src directory.

First, uninstall the original iptables software package.

Rpm-qa | grep iptables

Rpm-e -- nodeps iptables-devel

Rpm-e -- nodeps iptables

To facilitate installation, Log On As A root user

Then

Tar-jxvf iptables-1.3.0-20041231.tar.bz2

Tar-jxvf patch-o-matic-ng-20041231.tar.bz2

Cd patch-o-matic-ng-20041231

./Runme extra

Enter your kernel source code path/usr/src/linux-2.6.10

Enter your iptables source code path/usr/local/src/iptables-1.3.0-20041231

Then, install the iptables extension patch to the kernel as needed (to block bt, You must select ipp2p extension)

Cd/usr/src/linux-2.6.10

Make xconfig

Select networking support --> networking options --> networking packet filtering --> IP: netfilter configruation --> ipp2p match

Make

Make modules_install

Make install

The new kernel with the ipp2p module is installed.

Iptables is now installed

Cd/usr/local/src/iptables-1.3.0-20041231

Make KERNEL_DIR =/usr/src/linux-2.6.10

Make install KERNEL_DIR =/usr/src/linux-2.6.10

Make install-devel

Reboot


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.