Linux Netfilter discussions
 help / color / mirror / Atom feed
* ipt_string
@ 2004-09-20 18:46 Linux Query
  2004-09-20 19:04 ` ipt_string Rob Sterenborg
  2004-09-20 19:19 ` ipt_string Aleksandar Milivojevic
  0 siblings, 2 replies; 15+ messages in thread
From: Linux Query @ 2004-09-20 18:46 UTC (permalink / raw)
  To: netfilter

Hi !
 
I am new to linux and networking. However I have set up a router on a redhat 9 machine and am using htb.init + squid delay pools for bandwidth limiting. But I would like to do away with squid since I am just using it for the delay pools feature in order to limit downloading based on kewords such as .exe .mp3 .mpeg ..etc. The other day I came to know about the ipt_string module through google search and am wondering if thats what I am looking for. I am looking for something with which i can mark packets based on keywords and then limit the bandwidth for such packets with htb. Is the ipt_string module suitable for this ? If not, then please suggest an alternative.
 
Regards,
Jim.

		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

^ permalink raw reply	[flat|nested] 15+ messages in thread
* ipt_string
@ 2004-09-21  6:57 Linux Query
  0 siblings, 0 replies; 15+ messages in thread
From: Linux Query @ 2004-09-21  6:57 UTC (permalink / raw)
  To: netfilter


Well, but I still want to try out ipt_string if only
just for the experiece. I have never done things like
patching or kernel recompilation so far. Can anybody
please point me to some step by step guide for making
ipt_string work in redhat 9 please ..


Regards,
Jim.


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: ipt_string
@ 2004-09-20 21:43 Daniel Chemko
  2004-09-21  2:32 ` ipt_string David Cary Hart
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Chemko @ 2004-09-20 21:43 UTC (permalink / raw)
  To: Linux Query, netfilter

Linux Query wrote:
> Daniel Chemko <dchemko@smgtec.com> wrote:
> 
>> Or even better, use Snort-inline to detect infiltrations and use its
>> built-in response engine to drop the packets.
> 
> Didn't know about snort. Does it support string matching ?
> 
Snrot's generally used for Intrusion detections, but it is basically one
big string matching program a lot like l7filter that you mentioned in an
earlier post. I couldn't say which one is better suited for your needs.

Snort-inline does take some hand-holding to get started, but I believe
that more intrusions will be caught through snort than you adding rules
adhoc to l7filter. 


^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: ipt_string
@ 2004-09-20 19:44 Daniel Chemko
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Chemko @ 2004-09-20 19:44 UTC (permalink / raw)
  To: Aleksandar Milivojevic, netfilter


> You can try using ipt_string, but you will run into serious
>   limitations. ipt_string operates on single packet.  If the string
> you are trying to match is (for whatever reason) broken into multiple
> packet, ipt_string will not find it.  Also, ipt_string does not know
> anything about application level protocols (such as HTTP).  If it
> finds ".exe" anywhere in the packet's payload, it will match (whereas
> Squid will match only if it is part of URL, and you can specify that
> it must be at the end of the URL).
> 
> If I were you, I'd stick with Squid to do application level filtering.

Or even better, use Snort-inline to detect infiltrations and use its
built-in response engine to drop the packets.


^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: ipt_string...
@ 2004-05-06 18:01 Daniel Chemko
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Chemko @ 2004-05-06 18:01 UTC (permalink / raw)
  To: netfilter

> I would recommend you look at solutions which work at the application
> layer instead of the network routing layer for this sort of thing.  
> Depending on exactly what it is you're trying to do, Snort might be a
> good place to start. 

That reminds me:

Has anyone built snort-inline to work with RH9? Building turned ugly and
I gave up in futility. If you've done it, please list some info. Note:
Latest kernel with POM


^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: ipt_string...
@ 2004-05-06 17:58 Daniel Chemko
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Chemko @ 2004-05-06 17:58 UTC (permalink / raw)
  To: udo, netfilter

If you expect the string data on a specific port, you can narrow down
the number of packets searched. Basically, the best way to cut down CPU
is the ability to tell what 'isn't' in the string. Eg: If your traffic
is some unknown protocol, anything RELATED doesn't need to get string
matched. If you're just doing firewall based content filtering (not
ideal) then you'd just use the string match on inbound tcp spt 80 and
block tcp spt 443.

As for the size of the string, I highly doubt that having different
string lengths would make much of a performance hit. The search still
has to traverse the entire packet regardless of how long the string is.
The developer may say differently, but I don't see an advantage of
either way.


^ permalink raw reply	[flat|nested] 15+ messages in thread
* ipt_string...
@ 2004-05-06 17:26 udo
  2004-05-06 17:43 ` ipt_string Antony Stone
  0 siblings, 1 reply; 15+ messages in thread
From: udo @ 2004-05-06 17:26 UTC (permalink / raw)
  To: netfilter

Hello,

Does the string match function better (uses less CPU)
when matching long patterns or is it better to keep
the patterns as short as possible?
Or in other words: how can I use as many matches as
possible without hitting the CPU too much?

Kind regards,
Udo


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


^ permalink raw reply	[flat|nested] 15+ messages in thread
* ipt_string...
@ 2004-05-06 17:24 udo
  0 siblings, 0 replies; 15+ messages in thread
From: udo @ 2004-05-06 17:24 UTC (permalink / raw)
  To: netfilter

Hello


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


^ permalink raw reply	[flat|nested] 15+ messages in thread
* ipt_string
@ 2003-05-06 15:52 Rafael Silva =?unknown-8bit?q?Guimar=E3es?=
  0 siblings, 0 replies; 15+ messages in thread
From: Rafael Silva =?unknown-8bit?q?Guimar=E3es?= @ 2003-05-06 15:52 UTC (permalink / raw)
  To: netfilter


As I obtain to add lib libipt_string in compilacao of iptables-1.2.8... 

Rafael Silva Guimarães
http://www.infomania.com.br
Tecnico support


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-09-21  6:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 18:46 ipt_string Linux Query
2004-09-20 19:04 ` ipt_string Rob Sterenborg
2004-09-20 19:19 ` ipt_string Aleksandar Milivojevic
2004-09-20 20:05   ` ipt_string Linux Query
  -- strict thread matches above, loose matches on Subject: below --
2004-09-21  6:57 ipt_string Linux Query
2004-09-20 21:43 ipt_string Daniel Chemko
2004-09-21  2:32 ` ipt_string David Cary Hart
2004-09-21  6:44   ` ipt_string Linux Query
2004-09-20 19:44 ipt_string Daniel Chemko
2004-05-06 18:01 ipt_string Daniel Chemko
2004-05-06 17:58 ipt_string Daniel Chemko
2004-05-06 17:26 ipt_string udo
2004-05-06 17:43 ` ipt_string Antony Stone
2004-05-06 17:24 ipt_string udo
2003-05-06 15:52 ipt_string Rafael Silva =?unknown-8bit?q?Guimar=E3es?=

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox