Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Dash Four <mr.dash.four@googlemail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Andreas Herz <andi@geekosphere.org>, netfilter@vger.kernel.org
Subject: Re: [ANNOUNCE] ipset 6.19 released
Date: Sat, 11 May 2013 00:18:19 +0100	[thread overview]
Message-ID: <518D803B.5010702@googlemail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1305101758420.27743@blackhole.kfki.hu>



Jozsef Kadlecsik wrote:
> Some examples:
>
> a. Traffic counting from clients
>
> # Create the set, fill with elements
> ipset n clients hash:ip counters
> ipset a clients ...
> # Match in a rule
> iptables -A ... -m set --match-set clients src -j ...
> # List regularly the set and process the counter values
> ipset l clients
>
> b. Combined time and traffic limiting
>
> # Create the set, fill with elements
> ipset n guests hash:ip counters timeout $((2*60*60))
> ipset a guests ...
> # Allow traffic up to a given a limit or until timeout
> iptables -A ... \
>   -m set --match-set guests src --bytes-lt $((8*1024*1024)) ...
>
> There are some subleties of course: if the set match rule is negated
>
>    .... -m set ! --match-set foo src
>
> that is independent from increasing the packet and byte counters for the 
> elements which matched the lookup in the set - the negation happens at 
> rule evaluation level.
>
> As the updated iptables-extensions manpage shows, there are new flags to 
> suppress updating the packet and byte counters at different levels if one 
> matches a set from multiple rules.
>   
Jozsef, where is this updated iptables-extensions manpage you speak of?

The latest released version of iptables is 1.4.18, which obviously does 
not include any of the above since it was released before ipset 6.19. 
I've just looked at the main iptables git repo and there aren't any git 
logs since that release with anything related to ipset. In the ipset 
sources, apart from the main ipset man page, there is nothing there 
which describes the above iptables match options.


  reply	other threads:[~2013-05-10 23:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09 20:28 [ANNOUNCE] ipset 6.19 released Jozsef Kadlecsik
2013-05-10 12:32 ` Andreas Herz
2013-05-10 16:12   ` Jozsef Kadlecsik
2013-05-10 23:18     ` Dash Four [this message]
2013-05-11 10:42       ` Jozsef Kadlecsik
2013-05-11 12:11         ` Dash Four

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=518D803B.5010702@googlemail.com \
    --to=mr.dash.four@googlemail.com \
    --cc=andi@geekosphere.org \
    --cc=kadlec@blackhole.kfki.hu \
    --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