netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Rejecting non-CIDR conformant masks?
@ 2009-01-19 18:19 Jan Engelhardt
  2009-01-19 18:24 ` Patrick McHardy
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2009-01-19 18:19 UTC (permalink / raw)
  To: Netfilter Developer Mailing List

Hi,


once again, with that lovely IRC channel that is out there, I noticed a 
software that produces odd rules, and indeed, the latest iptables 
(and ip6tables) seem to allow a match that has no equivalent CIDR
number, such as:

	-A test -d 0.0.0.123/0.0.0.255

It absolutely works, but if iptables is supposed to support that (is 
it?), I should be adding it to the manpage.
Comments?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rejecting non-CIDR conformant masks?
  2009-01-19 18:19 Rejecting non-CIDR conformant masks? Jan Engelhardt
@ 2009-01-19 18:24 ` Patrick McHardy
  2009-01-19 22:08   ` Amos Jeffries
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2009-01-19 18:24 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

Jan Engelhardt wrote:
> once again, with that lovely IRC channel that is out there, I noticed a 
> software that produces odd rules, and indeed, the latest iptables 
> (and ip6tables) seem to allow a match that has no equivalent CIDR
> number, such as:
> 
> 	-A test -d 0.0.0.123/0.0.0.255
> 
> It absolutely works, but if iptables is supposed to support that (is 
> it?), I should be adding it to the manpage.
> Comments?

Its supposed to work, apparently people have been using masks like
/0.0.0.1 for load-balancing with better distribution than /1 :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rejecting non-CIDR conformant masks?
  2009-01-19 18:24 ` Patrick McHardy
@ 2009-01-19 22:08   ` Amos Jeffries
  2009-01-19 22:24     ` Patrick McHardy
  2009-01-20  7:12     ` Jan Engelhardt
  0 siblings, 2 replies; 7+ messages in thread
From: Amos Jeffries @ 2009-01-19 22:08 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Jan Engelhardt, Netfilter Developer Mailing List

> Jan Engelhardt wrote:
>> once again, with that lovely IRC channel that is out there, I noticed a
>> software that produces odd rules, and indeed, the latest iptables
>> (and ip6tables) seem to allow a match that has no equivalent CIDR
>> number, such as:
>>
>> 	-A test -d 0.0.0.123/0.0.0.255
>>
>> It absolutely works, but if iptables is supposed to support that (is
>> it?), I should be adding it to the manpage.
>> Comments?
>
> Its supposed to work, apparently people have been using masks like
> /0.0.0.1 for load-balancing with better distribution than /1 :)

Should they not be using ipset for that?

The acceptance of this in ip6tables is a major security worry. With the
non-local network possibly accepting and routing hosts with 'forged' host
parts.

AYJ



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rejecting non-CIDR conformant masks?
  2009-01-19 22:08   ` Amos Jeffries
@ 2009-01-19 22:24     ` Patrick McHardy
  2009-01-19 22:48       ` Amos Jeffries
  2009-01-20  7:12     ` Jan Engelhardt
  1 sibling, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2009-01-19 22:24 UTC (permalink / raw)
  To: Amos Jeffries; +Cc: Jan Engelhardt, Netfilter Developer Mailing List

Amos Jeffries wrote:
>> Jan Engelhardt wrote:
>>     
>>> once again, with that lovely IRC channel that is out there, I noticed a
>>> software that produces odd rules, and indeed, the latest iptables
>>> (and ip6tables) seem to allow a match that has no equivalent CIDR
>>> number, such as:
>>>
>>> 	-A test -d 0.0.0.123/0.0.0.255
>>>
>>> It absolutely works, but if iptables is supposed to support that (is
>>> it?), I should be adding it to the manpage.
>>> Comments?
>>>       
>> Its supposed to work, apparently people have been using masks like
>> /0.0.0.1 for load-balancing with better distribution than /1 :)
>>     
>
> Should they not be using ipset for that?

Why shouldn't they do this, its simple and probably effective.
> The acceptance of this in ip6tables is a major security worry. With the
> non-local network possibly accepting and routing hosts with 'forged' host
> parts.
>   

I don't get the point, people can simply choose not to use this.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rejecting non-CIDR conformant masks?
  2009-01-19 22:24     ` Patrick McHardy
@ 2009-01-19 22:48       ` Amos Jeffries
  0 siblings, 0 replies; 7+ messages in thread
From: Amos Jeffries @ 2009-01-19 22:48 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Amos Jeffries, Jan Engelhardt, Netfilter Developer Mailing List

> Amos Jeffries wrote:
>>> Jan Engelhardt wrote:
>>>
>>>> once again, with that lovely IRC channel that is out there, I noticed
>>>> a
>>>> software that produces odd rules, and indeed, the latest iptables
>>>> (and ip6tables) seem to allow a match that has no equivalent CIDR
>>>> number, such as:
>>>>
>>>> 	-A test -d 0.0.0.123/0.0.0.255
>>>>
>>>> It absolutely works, but if iptables is supposed to support that (is
>>>> it?), I should be adding it to the manpage.
>>>> Comments?
>>>>
>>> Its supposed to work, apparently people have been using masks like
>>> /0.0.0.1 for load-balancing with better distribution than /1 :)
>>>
>>
>> Should they not be using ipset for that?
>
> Why shouldn't they do this, its simple and probably effective.

Just wondering if ipset would to the same thing.

>
>> The acceptance of this in ip6tables is a major security worry. With the
>> non-local network possibly accepting and routing hosts with 'forged'
>> host
>> parts.
>>
>
> I don't get the point, people can simply choose not to use this.
>

I've met far too many admin who blindly follow online tutorials without
having the time to understand them. As you say this works and is simple,
where the secure alternative may not be.

AYJ


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rejecting non-CIDR conformant masks?
  2009-01-19 22:08   ` Amos Jeffries
  2009-01-19 22:24     ` Patrick McHardy
@ 2009-01-20  7:12     ` Jan Engelhardt
  2009-01-20  8:42       ` Jozsef Kadlecsik
  1 sibling, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2009-01-20  7:12 UTC (permalink / raw)
  To: Amos Jeffries; +Cc: Patrick McHardy, Netfilter Developer Mailing List


On Monday 2009-01-19 23:08, Amos Jeffries wrote:
>>> 	-A test -d 0.0.0.123/0.0.0.255
>>
>> Its supposed to work, apparently people have been using masks like
>> /0.0.0.1 for load-balancing with better distribution than /1 :)
>
>Should they not be using ipset for that?

I am not sure ipset provides an appropriate (optimized) set type for that,
and since /0.0.0.1 is about 2^31 hosts, all the existing types
including tree and bitmap would seem to take large amounts of memory
due to this pattern.

>The acceptance of this in ip6tables is a major security worry. With the
>non-local network possibly accepting and routing hosts with 'forged' host
>parts.

That is why you add extra specifiers like -i/-o xyz to restrict
what /0.0.0.1 applies to.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rejecting non-CIDR conformant masks?
  2009-01-20  7:12     ` Jan Engelhardt
@ 2009-01-20  8:42       ` Jozsef Kadlecsik
  0 siblings, 0 replies; 7+ messages in thread
From: Jozsef Kadlecsik @ 2009-01-20  8:42 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Amos Jeffries, Patrick McHardy, Netfilter Developer Mailing List

On Tue, 20 Jan 2009, Jan Engelhardt wrote:

> 
> On Monday 2009-01-19 23:08, Amos Jeffries wrote:
> >>> 	-A test -d 0.0.0.123/0.0.0.255
> >>
> >> Its supposed to work, apparently people have been using masks like
> >> /0.0.0.1 for load-balancing with better distribution than /1 :)
> >
> >Should they not be using ipset for that?
> 
> I am not sure ipset provides an appropriate (optimized) set type for that,
> and since /0.0.0.1 is about 2^31 hosts, all the existing types
> including tree and bitmap would seem to take large amounts of memory
> due to this pattern.

Yes, exactly. ipset is not suited to handle such cases.

Best regards,
Jzosef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-20  8:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 18:19 Rejecting non-CIDR conformant masks? Jan Engelhardt
2009-01-19 18:24 ` Patrick McHardy
2009-01-19 22:08   ` Amos Jeffries
2009-01-19 22:24     ` Patrick McHardy
2009-01-19 22:48       ` Amos Jeffries
2009-01-20  7:12     ` Jan Engelhardt
2009-01-20  8:42       ` Jozsef Kadlecsik

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).