All of lore.kernel.org
 help / color / mirror / Atom feed
* "rope" match module
@ 2004-11-02 13:46 Chris Lowth
  2004-11-03 15:56 ` Evrim ULU
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Lowth @ 2004-11-02 13:46 UTC (permalink / raw)
  To: netfilter-devel

I have been working for a while on a match module that provides the 
facility of matching packets based on a simple pseduo-scripting language 
compiled in user-land and executed in kernel-land.

So far, the mechanism is outlined (incompletely) in an on-line power-point
presentation (sorry!) and the code exists on one non-mission-critical
development server. Source code will be released (I hope) in the next few 
weeks.

The reason for this note is to ask whether anyone has the time and
inclination to make any comments on the design of the ideas behind the
module (http://www.lowth.com/rope).

The basic mechanism for setting up a packet match rule using ROPE is..

1. Write the rope script

2. Copy the script to /etc/rope.d/scripts

3. Compile and pass it to the kernel using the "iptables" command, like
   this (to drop packets from morphus p2p protocol)..

		iptables -m rope --script morpheus -j DROP

The "compiled" format is binary but not machine code. Language features 
are limited to those needed for packet matching - this is not a general 
purpose kernel scripting language (although it could be, at a pinch).

The module provides access to the IP and UDP/TCP header and data payload.
It will eventually link with conntrack to allow conection-context data to
be manipulated as well.

So far - the language is not complete enough to site any but the simplest 
of working examples - but it's getting there. Here's a VERY simple test 
for web traffic, based on the protocol type and port number (yes - I know 
there is a FAR easier way to do this - this is just a test example).

 if (
	$ip_protocol 6 eq  # tcp?
	$tcp_dest 80 eq    # http?
		and
	{ yes } { no }
) do

The idea for the name "rope" comes from the concept of a "stronger string" 
and also plays to the fact that the scripting language is REverse POlish 
(partial anagram).

Chris.

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

end of thread, other threads:[~2004-11-04  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-02 13:46 "rope" match module Chris Lowth
2004-11-03 15:56 ` Evrim ULU
2004-11-04  9:57   ` Chris Lowth

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.