Use iptables to block Intranet btsoftware

Source: Internet
Author: User

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!

Use the cvs version iptables inFtp://ftp.netfilter.org/pub/iptables/snapshot/There are extension packages for downloading and iptables
Patch-o-matic-ng inFtp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/Download is also available.

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

After the restart, select a new kernel to enter the system. If your system kernel selects the automatic mounting module function, you can directly use the following command to unlock the p2p software.
Use iptables-a forward-p tcp-m ipp2p -- ipp2p -- bit -- apple -- winmx -- soul-j DROP

If your system kernel does not select the automatic Mount module function, you must first
Modprobe ipt_ipp2p

For more detailed control, see ipp2p module documentation and iptables documentation.
Bitcomet and emule of the Intranet cannot be downloaded or uploaded!

Related Article

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.