Limit poctu spojeni

kopecek na centrum.cz kopecek na centrum.cz
Pátek Březen 16 10:46:06 CET 2007


Takze problem jsem zda se vyresil. Mel jsem sice connlimit modul v
iptables, ale ne v kernelu. V kernelu standardne connlimit netfilter
extenze neni. Musi se patchnout patch-o-magic se stazenim modulu connlimit
a rebuidnout kernel...

Na mailkonfere na netfilter.org mi poradili nasledujici, coz jsem udelal a
funguje to. Takze ted limituju (zatim jen te jedne zlobive IP) pocet
spojeni na 300 a zda se, ze to chodi. Klient o tom asi ani nevi, protoze
kdyz se proste p2p aplikace snazi navazat 301 spojeni tak se ji resne a
nenavaze se dokud pocet neklesne pod 300 (jine se neuvolni).

The solution:
1) Download your kernel and iptables sources.
2) Apply patch-o-matic
a) ./runme --download (connlimit is diferent repository)
b) ./runme connlimit
3) Select the "connlimit" extension into your kernel config.
4) Compile and install
5) Reestart using your new kernel.

Well known to working configurations are:
kernel 2.6.19.7 and iptables 1.3.7
kernel 2.6.18.x and iptables 1.3.7


a pak uz jen 
iptables -A FORWARD -p tcp -m connlimit -s 10.88.XX.XX --connlimit-above
300 --connlimit-mask 32 -j REJECT --reject-with tcp-reset




Další informace o konferenci Linux