netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Herz <andi@geekosphere.org>
To: netfilter@vger.kernel.org
Subject: adding more options for ipset
Date: Mon, 16 Apr 2012 13:27:58 +0200	[thread overview]
Message-ID: <20120416112758.GD29947@sweethome.fritz.box> (raw)

Hi,

i'm playing around with ipset and i'm adding two new options. The one is
the possibility to add a timeout to a existing timeout value and the
other one is to compare the timeouts of two sets. The second also gets a
threshold value to return true or false for a match.

I got it working for several testcases, but still not finished. I'm just
asking if there is any interest in these featueres. I already wrote the
first idea to Josef and he did put it on the feature request list.

The new options look like this:

1. Addition example on the Target:

iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SET
--add-set firstset src,src --timeout 4000 --exist --addition

with this option the existing timeout for this source in the "firstset"
set is now 4000 more seconds long. The "--addition" flag forces ipset to
increase the timeout instead of replacing it.

2. Compare example of the match:

iptables -A INPUT -m set --compare-set firstset src,src secondsec
--threshold 1000

So the match is true if the source is in both sets and the timeout
difference between the two entries is greater then 1000 seconds.

So if there is anyone interested in this i will publish the sourcecode
here, although it's far from perfect and i'm totally new to this :)
Nevertheless i will work on this and i will also test around with ipset
more.

Greetings
-- 
Andreas Herz

                 reply	other threads:[~2012-04-16 11:27 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120416112758.GD29947@sweethome.fritz.box \
    --to=andi@geekosphere.org \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).