All of lore.kernel.org
 help / color / mirror / Atom feed
From: "mikee" <mpokrywka@hoga.pl>
To: lartc@vger.kernel.org
Subject: [LARTC] kazaaa is making me crazy!
Date: Wed, 11 Jun 2003 18:43:56 +0000	[thread overview]
Message-ID: <marc-lartc-105535721801764@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105529169905447@msgid-missing>

> anorther thing..this rule just filter the initial download request..that
> would be okay if oyu want filter completely, but if you want to slwo
> down (i mean using tc/htb/fwmarks) you wouldnt be matching the hole
> download, only the request...
>
>iptables -t mangle -A PREROUTING -p tcp -m --string "Kazaa" -j DROP
>
> any comment, any idea?

you can use iptables connmark extension (from patch -o-matic) to mark all packets from connection, ie:

iptables -t mangle -N detect-abusers
#if string kazaa detected then connection will be marked
iptables -t mangle -A detect-abusers -m string --string 'KaZaA' -j CONNMARK --set-mark 0x1

#check if connection is marked, if not inspect packet
iptables -t mangle -A PREROUTING -m connmark --mark 0x0 -j detect-abusers
#set packet mark with those from connmark
iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark

and now you can use:
tc filter add dev eth0 parent 1:0 protocol ip handle 1 fw classid your_kazaa_class

i don't use string match so i'm not sure if that would work - personally i detect "abusers" by destination port (well known ports http/smtp/pop3 are allowed at full speed)
HTH

__________________________
ignore ads below this line

Zobacz nasz nowy serwis - wczasy za granic± - http://hoga.travelplanet.pl/
------------------------------------------------------------
Wiosn± wirusy rosn± bez pamiêci!dlatego do pakietów wielostanowiskowych
mks_vir dok³adamy Mobile Disks. Sprawd¼:
http://www.mks.com.pl/promocja-mobile.html
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2003-06-11 18:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-11  0:35 [LARTC] kazaaa is making me crazy! Esteban Ribicic
2003-06-11  0:35 ` Esteban Ribicic
2003-06-11  0:51 ` Robert Penz
2003-06-11  7:02 ` René Serral
2003-06-11 16:34 ` Stef Coene
2003-06-11 18:43 ` mikee [this message]
2003-06-11 19:25 ` Andre Lorenz
2003-06-17 18:56 ` Eric Leblond

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105535721801764@msgid-missing \
    --to=mpokrywka@hoga.pl \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.