From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 10d4db,83a3715df805a652 X-Google-Attributes: gid10d4db,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 12 Dec 2005 17:10:05 -0600 Return-Path: X-COLA-Policy: http://stump.algebra.com/~cola X-COLA-Info-1: Send submissions to cola@stump.algebra.com X-COLA-Info-2: Send complaints to cola-admin@stump.algebra.com X-Comment: moderators do not necessarily agree or disagree with this article. X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) Date: Mon, 12 Dec 2005 17:08:13 -0600 Message-ID: <439E02C7.40200@lowth.com> From: Chris Lowth User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 Subject: IpTables ROPE 20051212 - packet match rule scripting language References: <42751E19.6000506@lowth.com> In-Reply-To: <42751E19.6000506@lowth.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on ak74.algebra.com X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.0.0 Newsgroups: comp.os.linux.announce X-Auth: PGPMoose V1.1 PGP comp.os.linux.announce iQBVAwUAQ54C3SFvAtx2nXvNAQGgdAH/cQlxNUEdepd6+1OVir9tnF0CiITWSe7r v10XI93cPhakyiF9pKwQYnVVpXE9MsX++gp/zW1Y/9ZtCJvD7NL7GA== =nOtF NNTP-Posting-Host: 65.182.171.162 X-Trace: sv3-q0Ki+ZyjDNsvynea4Xq20zuvsHtXPHMaQL5dBISggtXY4sPmuxzwPGIo5gNFA2rYKiFFo9PRVCBJ+Wa!9p7v7DZJBB0XCwW+FkMVQb9Z1Ip1Du3fFwBDV6IZR/lop3IHkb+bbRJJGG6Ey/sJBe5eWKFcTItp!452s X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.os.linux.announce:554 A new version of "Rope" has been released. Changes since the last announcement include... . Fix to EDonkey2000 identification script . Fix to iptables save/restore format strings . New actions: . eqi, nei -- case insensitive equality checking . abs -- absolute integer value of a number . eval -- execute a block and trap (catch) the exit status . sysexec -- run a shell command (for use in UserLand mode only) . Correction to character set checked by "isuri" . Makefile-driven patching of . Kernel sources . Iptables sources . Patch-o-matic-ng . Pre-built binary version for IpCop 1.4.10 ROPE is a scritable packet 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. Sample scripts available with the software include identification of various P2P protocols. It is available under the GPL from http://www.lowth.com/rope. A simple 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 trivial ROPE script to provide this logic... $tcp_source 80 eq assert # check that 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" and compiled as "contlen.rp", then it can be installed into an Iptables chain using a command like. iptables -A FORWARD -m rope --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/ # ##########################################################################