From: Mr Dash Four <mr.dash.four@googlemail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Dennis Jacobfeuerborn <dennisml@conversis.de>,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org
Subject: Re: [ANNOUNCE] ipset-5.0 released
Date: Sun, 26 Dec 2010 21:44:16 +0000 [thread overview]
Message-ID: <4D17B730.8040505@googlemail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1012262034390.10148@blackhole.kfki.hu>
>> You are expanding the command line port ranges (80-82 in your example above)
>> to add the underlying elements. Could you not do a similar arrangement for the
>> protocol as well?
>>
> That won't go: tcp and udp are not the possible protocols alone, so by any
> reasonable syntax, '*' or 'all' should have to mean all protocols from
> /etc/protocols.
>
Whatever the appropriate place holder is - 'all', '*', '@', '$$$$$$'
etc. etc - as long as it does the job at the end it won't matter.
>> It is not a perfect solution by any stretch, but at least it will save me the
>> hassle, as with the introduction of the port ranges, of executing the
>> statement twice each time I want to include net and port ranges without being
>> interested in the protocol match.
>>
>
> What I could come up as something similar in effect is to make possible to
> use a copy of /etc/services maintained by the administrator of the given
> ipset installation and whatever protocols and ports a service name is
> resolved to from that file, use those.
>
I wasn't aware that there are more than 2 (tcp and udp) protocols on
which I could define/use ports!
> However such a feature won't be added tomorrow. Nor this year (:-) or the
> very near future.
>
What are your plans?
> For the "net" (sub)type of sets the different prefixes in the set is
> recorded. When testing (adding/deleting) entries, the IP part of the entry
> is masked with the prefixes one by one and looked up until a match is
> found or the list is exhausted - that's why the speed is linearly slows
> down with the different number of prefixes added to the set. An example:
>
> # ipset create test hash:net
> # ipset add test 192.168.0.0/30
> # ipset add test 192.168.1.0/24
>
> There are two different prefixes in the set, 30, 24. So when the command
> is issued
>
> # ipset test test 192.168.0.1
>
> the address 192.168.0.1 is masked with /30 and the result is looked up
> and the match is reported:
>
So, in other words 'internally' you store something like (using your
example above) 192.168.0.0 (the IP part), 30 (the prefix), tcp, 80 in
the structure, is that right?
Do you then use the mask of each member of that set (30 and 24 in your
example above) until you get a match? In other words, you 'walk through'
every internally stored element and try their mask and then lookup for a
match, is that how you do it?
>> Is this slowdown more than when I use iptreemap set for example? How does the
>> new set (hash) performance compares against the 'old' iptreemap/treemap sets
>> used in 4.x?
>>
>
> I never measured the speed difference between the two types. A good guess
> is that iptreemap is faster.
Thought so!
> However, the problem with iptree(map) is that
> it's susceptible when used as a container to block attackers dynamically
> by the SET target: it's trivial to mount an attack by which the worst tree
> structure is forced to be created.
Could you expand on that bit please? What do you mean?
next prev parent reply other threads:[~2010-12-26 21:44 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 22:26 [ANNOUNCE] ipset-5.0 released Jozsef Kadlecsik
2010-12-17 23:32 ` Jan Engelhardt
2010-12-18 10:40 ` Jozsef Kadlecsik
2010-12-18 7:29 ` Rob Sterenborg (lists)
2010-12-18 11:13 ` Jozsef Kadlecsik
2010-12-18 15:43 ` Jan Engelhardt
2010-12-18 19:50 ` Jozsef Kadlecsik
2010-12-18 21:49 ` Jan Engelhardt
2010-12-19 0:05 ` Jozsef Kadlecsik
2010-12-19 0:28 ` Jan Engelhardt
2010-12-19 5:56 ` Jan Engelhardt
2010-12-19 18:23 ` Rob Sterenborg (lists)
2010-12-21 11:14 ` Rob Sterenborg (lists)
2010-12-21 14:03 ` Jozsef Kadlecsik
2010-12-18 14:22 ` Mr Dash Four
2010-12-18 20:23 ` Jozsef Kadlecsik
2010-12-18 21:51 ` Mr Dash Four
2010-12-18 22:10 ` Jan Engelhardt
2010-12-18 22:23 ` Mr Dash Four
2010-12-19 0:34 ` Jozsef Kadlecsik
2010-12-19 13:52 ` Mr Dash Four
2010-12-19 15:20 ` Dennis Jacobfeuerborn
2010-12-19 17:04 ` Mr Dash Four
2010-12-22 10:59 ` Jozsef Kadlecsik
2010-12-22 12:48 ` Mr Dash Four
2010-12-23 15:39 ` Jozsef Kadlecsik
2010-12-23 17:50 ` Mr Dash Four
2010-12-23 17:55 ` David Miller
2010-12-23 18:00 ` Mr Dash Four
2010-12-23 18:06 ` David Miller
2010-12-23 18:10 ` Mr Dash Four
2010-12-23 19:35 ` Jozsef Kadlecsik
2010-12-23 22:23 ` Mr Dash Four
2010-12-23 22:46 ` Jozsef Kadlecsik
2010-12-23 22:56 ` Jozsef Kadlecsik
2010-12-23 23:06 ` Mr Dash Four
2010-12-26 10:30 ` Jozsef Kadlecsik
2010-12-26 13:47 ` Mr Dash Four
2010-12-26 20:09 ` Jozsef Kadlecsik
2010-12-26 21:44 ` Mr Dash Four [this message]
2010-12-27 14:49 ` Jozsef Kadlecsik
2010-12-27 16:23 ` Mr Dash Four
2010-12-27 18:20 ` Jozsef Kadlecsik
2010-12-27 18:52 ` Mr Dash Four
2010-12-28 19:26 ` Jozsef Kadlecsik
2010-12-23 23:03 ` Mr Dash Four
2010-12-26 10:32 ` Jozsef Kadlecsik
2010-12-23 21:51 ` Jan Engelhardt
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=4D17B730.8040505@googlemail.com \
--to=mr.dash.four@googlemail.com \
--cc=dennisml@conversis.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.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).