Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
From: Chris Lowth <chris@lowth.com>
Subject: ANNOUNCE: Rope 20041121b - IpTables match module scripting language
Date: Tue, 30 Nov 2004 10:48:17 CST	[thread overview]
Message-ID: <41ACA43E.60302@lowth.com> (raw)

ROPE is a match module for Linux iptables / Netfilter. It allows packet 
matching  criteria to be written using a simple scripting language which 
is executed in and by the Linux kernel.

It is available under the GPL from http://www.lowth.com/rope. The 
current version should be considered experimental; dont deploy on 
mission-critical systems, but please feel free to download, explore and 
feedback.

An example :- a rule that limits the size of pages downloaded over HTTP 
based on the Content-Length header could prevent long downloads before 
they even start. Here's a simple ROPE script to provide this logic...

   $tcp_source 80 eq assert            # check it's HTTP
   expecti_to( "Content-Length: " )    # find the header
   expect_while({isdigit}) put($n)     # lift the length value
   if( atoi($n) 1000000 gt { yes } )   # match: if too long
   no                                  # dont match: if not

If this script is stored as "contlen.rope", then it is installed into an 
Iptables chain using a command like.

   iptables -A FORWARD -m rope --script contlen -j DROP

For more information (including a more thorough version of the example 
script), please refer to:

    http://www.lowth.com/rope

##########################################################################
# Send submissions for comp.os.linux.announce to: cola@stump.algebra.com #
# PLEASE remember a short description of the software and the LOCATION.  #
# This group is archived at http://stump.algebra.com/~cola/              #
##########################################################################



                 reply	other threads:[~2004-11-30 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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