All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Feasability of Protocol Filtering
@ 2003-04-23 21:28 Eicke Friedrich
  2003-04-23 22:03 ` Matt Skidmore
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Eicke Friedrich @ 2003-04-23 21:28 UTC (permalink / raw)
  To: netfilter-devel

Hi there,

Matt Skidmore wrote:
 > I have gained some interest in adding a new module to the netfilter code
 > for filtering by protocol. However, I do not know how realistic this
 > project would be. I have not found any projects similar to it as of yet.
 > But, I would like to be able to REJECT, DENY, or REDIRECT packets based on
 > the protocol of their connection.

i'm doing a quite similar thing at the moment: i'm developing a match that recognizes p2p 
traffic (kazaa, edonkey finished but more to come) by their protocol and mark them. After 
that i use a tc filter to read the marks and put the packets in QoS classes.
What you need is something characteristic for every protocol. For example: every 
kazaa-download starts with a packet containing the string "GET /.hash=" - i do a 
string-match on each packet and if i find a match i just mark the whole connection with 
CONNMARK.
By doing this i can treat every kazaa-download in the same way regardless of port or 
ip-adress. But i'm a little bit concerned about the required ressources. If you're going 
to use this match for many protocols and in a highly stressed environment you will need 
much ram and lots of cpu power.
I'm going to test the behavior of my match in a couple of weeks for a 10MBit/sec 
environment - if someone is interessted i can send the results to the list or put it on a 
webpage.
I started doing some network sniffin' and if you can find something characteristic for the 
protocols you're going to match it should be easy to create an appropriate module. Hope my 
thoughts will help you a little bit.

Regards,
Eicke.

PS: if you receive this message twice - sorry! first time i used the wrong mailbox.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Feasability of Protocol Filtering
@ 2003-04-26  0:41 Ian Latter
  2003-04-26  0:10 ` Matt Skidmore
  0 siblings, 1 reply; 22+ messages in thread
From: Ian Latter @ 2003-04-26  0:41 UTC (permalink / raw)
  To: Patrick Schaaf; +Cc: netfilter-devel

Good question;

> I've got a heretic question:
> 
> > Examples:
> > Identify and DENY SSH traffic regardless of port
> 
> How do you cope with an ftp transfer of a tcpdump capture of some
> earlier SSH traffic?

But wouldn't this be resolved by only doing a single pass through of
the detection code, per stream/conntrack?  Ie;  if the ftp data is related
to an existing ftp stream, then it won't have a detection attempt made
on it by the proto_detect module ... surely ...

This whole thread on protocol detection, particularly with protocols like
P2P, is sweet ...  very cool stuff ... very useful.




--
Ian Latter
Internet and Networking Security Officer
Macquarie University

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Feasability of Protocol Filtering
@ 2003-04-23 15:16 Matt Skidmore
  2003-04-23 21:15 ` Eicke Friedrich
  0 siblings, 1 reply; 22+ messages in thread
From: Matt Skidmore @ 2003-04-23 15:16 UTC (permalink / raw)
  To: netfilter-devel


I have gained some interest in adding a new module to the netfilter code
for filtering by protocol. However, I do not know how realistic this
project would be. I have not found any projects similar to it as of yet.
But, I would like to be able to REJECT, DENY, or REDIRECT packets based on
the protocol of their connection.

Examples:
Identify and DENY SSH traffic regardless of port

Identify HTTP traffic regardless of port and REDIRECT/reroute it
transparently through another route or hand it to a transparent proxy.

I believe Cisco has a similar feature in their IOS called protocol
discovery (not 100% sure)
(http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080153efc.html)

If it isn't workable that's fine, I'm just throwing in an idea for
something I might like to contribute to. I've not worked on any parts of
the kernel and I would need to shake the dust off my C and and TCP
knowledge, but I'm willing to jump into the pit and give it a try.

Please be gentle, first post to this list. This is just a probe of a
peliminary idea, if there is some hope for the idea I would continue to
brainstorm and elaborate on other features that may be achievable.

-Matt

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Feasability of Protocol Filtering
@ 2003-04-22 23:25 Matt Skidmore
  2003-04-25  8:31 ` Patrick Schaaf
  2003-04-27 13:09 ` Harald Welte
  0 siblings, 2 replies; 22+ messages in thread
From: Matt Skidmore @ 2003-04-22 23:25 UTC (permalink / raw)
  To: netfilter-devel


I have gained some interest in adding a new module to the netfilter code
for filtering by protocol. However, I do not know how realistic this
project would be. I have not found any projects similar to it as of yet.
But, I would like to be able to REJECT, DENY, or REDIRECT packets based on
the protocol of their connection.

Examples:
Identify and DENY SSH traffic regardless of port

Identify HTTP traffic regardless of port and REDIRECT/reroute it
transparently through another route or hand it to a transparent proxy.

I believe Cisco has a similar feature in their IOS called protocol
discovery (not 100% sure)
(http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080153efc.html)

If it isn't workable that's fine, I'm just throwing in an idea for
something I might like to contribute to. I've not worked on any parts of
the kernel and I would need to shake the dust off my C and and TCP
knowledge, but I'm willing to jump into the pit and give it a try.

Please be gentle, first post to this list. This is just a probe of a
peliminary idea, if there is some hope for the idea I would continue to
brainstorm and elaborate on other features that may be achievable.

-Matt

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

end of thread, other threads:[~2003-04-27 13:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-23 21:28 Feasability of Protocol Filtering Eicke Friedrich
2003-04-23 22:03 ` Matt Skidmore
2003-04-24 20:31   ` Eicke Friedrich
2003-04-23 22:37 ` Martin Josefsson
2003-04-24 12:16   ` Jozsef Kadlecsik
2003-04-24 12:55     ` Martin Josefsson
2003-04-24 14:16       ` pre, pre, premangle? Scott MacKay
2003-04-24 14:44         ` Martin Josefsson
2003-04-24 15:30           ` Scott MacKay
2003-04-25  0:28           ` ipq_packet_msg, hook? Scott MacKay
2003-04-24 19:38   ` Feasability of Protocol Filtering Eicke Friedrich
2003-04-24 19:55 ` Filipe Almeida
2003-04-24 20:31   ` Eicke Friedrich
  -- strict thread matches above, loose matches on Subject: below --
2003-04-26  0:41 Ian Latter
2003-04-26  0:10 ` Matt Skidmore
2003-04-23 15:16 Matt Skidmore
2003-04-23 21:15 ` Eicke Friedrich
2003-04-25  9:36   ` Serge Droz
2003-04-22 23:25 Matt Skidmore
2003-04-25  8:31 ` Patrick Schaaf
2003-04-25  9:03   ` Eicke Friedrich
2003-04-27 13:09 ` Harald Welte

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.