In April of this year, saw a report saying that although a broadband company's existing technology can accommodate network user with a capacity of 400 to 600 million users, but at present, accommodate 45 million users, the network is already crowded, often a broken network, to the Internet, network speed will decrease dramatically.
Why network would be so crowded? this is because since such as eMule, Kazaa, P2P software, such as BT, the mass of data files (such as bulk file exchange, video downloads, etc) has a majority of the network bandwidth. P2P this new application to the user brings unprecedented convenience and a wealth of resources, but also triggered a network bandwidth, and security issues. How to play the powerful P2P subject to the necessary restrictions? this article describes how to use Linux netfilter/iptables for P2P application flow restrictions. Upgrading the kernel since the public release of the Linux kernel files, various parameters related to iptables not on P2P property parameter, you must upgrade the Linux kernel and iptables to play on this patch, so that it supports P2P property settings. In concrete actions, to learn more about upgrading the kernel patches need some related software: linux-2.4.20-8.tar.gz, patch-o-matic-20040609.tar.bz2, iptables-1.2.8.tar.bz2, iptables-p2p-0.3.0a.tar.gz and ipp2p-0.5c.tar.gz. Here's the test environment for 2.4.20 kernel for RedHat9.0-8. Because 2.4. * is a stable kernel, so you cannot take the current development of the new features introduced into the main kernel, but only the first test in patch-o-matic and patched in the kernel. In CVS, you can find the latest patch-o-matic package — Patch-o-matic-20040609.tar.bz2. There is a kernel support, also requires iptables support, including iptables-p2p-0.3.0a.tar.gz for netfilter/iptables organization development of specialized support iptables extension package of P2P; ipp2p-0.5c.tar.gz to support the development of a EickeFriedrich P2P of iptables expansion pack. The two expansion packs have their own characteristics, will be introduced later. Mount the module first unzip the package under the/usr/src: # bzip2-dpatch-o-matic-20040609.tar.bz2 generated patch-o-matic-20040609.tar.out. # Tarxvfpatch-o-matic-20040609.tar.out generated patch directory patch-o-matic-20040609. In the default kernel RedHat9.0 directory/usr/src/linux-2.4. Enter patch directory/usr/src/patch-o-matic-20040609, because support for P2P protocol control options need CONNMARK module, the module in extra subdirectory, so you need to run the following command to upgrade the kernel patch. # KERNEL_DIR =/usr/src/linux-2.4./runmeextra run this command after a module select interface, the interface has two zones, one for the related module name, module, function, usage and grammar instance; another given various options, such as N/y/b/r.../q/?, the first capital letters that represent the default option, n represents the next module, y, b represents the previous module, q to quit. First you should determine the current module is needed, do not need to press "N" key after the carriage return, continue to display the next module. When you receive the necessary module, press the "Y" key to confirm, at the same time should be inside the related grammar instance reproduced down to standby. Once you have selected all the required module, press the "Q" key to exit. Compile the kernel into the kernel file to start the directory/usr/src/linux-2.4, compile the kernel: # makemrproper # makexconfig (or # makemenuconfig) Note that the configuration options you must select Networkingoptions → IP: NetfilterConfiguration → Connectionmarktrackingsupport and CONNMARKtargetsupport two options. Make sure the key file in the correct position: # makedep compile large kernel:# MakebzImage compile selected modules: # makemodules will compiled module to system standard location: # makemodules_install let the system automatically modify the boot configuration file grub.con: # makeinstall reboot the system, select RedHatLinux (2.4.2
No comments:
Post a Comment