🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by D. Stussy Thu, 26 Nov 2009 00:09
INN's readers.conf: CIDR with hostname?
#82212
Author: D. Stussy
Date: Thu, 26 Nov 2009 00:09
8 lines
1431 bytes
Is a CIDR expression allowed with a hostname (for hosts or localaddress in
the auth group section of the file), or is it only for IP address literals?

I try to avoid address literals in my configuration files (except the name
server, where such cannot be avoided) where possible.  Specifying the local
subnet with a CIDR'ed hostname yields a portable configuration.

Re: INN's readers.conf: CIDR with hostname?
#82211
Author: Julien ÉLIE
Date: Thu, 26 Nov 2009 06:43
41 lines
3154 bytes
Hi D. Stussy,

> Is a CIDR expression allowed with a hostname (for hosts or localaddress in
> the auth group section of the file), or is it only for IP address literals?

I do not understand the point you want to make.  Did you try and it didn't work?

Because the documentation of these parameters mentions that:

  hosts:

    A comma-separated list of remote hosts, wildmat patterns matching either
    hostnames or IP addresses, or IP netblocks specified in CIDR notation.
    If a user connects from a host that doesn't match this parameter, this auth
    group will not match the connection and is ignored.

    Note that if you have a large number of patterns that can't be merged into
    broader patterns (such as a large number of individual systems scattered
    around the net that should have access), the hosts: parameter may exceed
    the maximum line length of 8,192 characters. In that case, you'll need
    to break that auth group into multiple auth groups, each with a portion
    of the hosts listed in its hosts: parameter, and each assigning the same
    user identity.

    All hosts match if this parameter is not given.

  localaddress:

    A comma-separated list of local host or address patterns with the same
    syntax as the same as with the hosts: parameter.  If this parameter is
    specified, its auth group will only match connections made to a matching
    local interface.  (Obviously, this is only useful for servers with
    multiple interfaces.)

    All local addresses match if this parameter is not given.

-- 
Julien ÉLIE

« Dulce et decorum est pro patria mori. » (Horace) 
Re: INN's readers.conf: CIDR with hostname?
#82213
Author: Russ Allbery
Date: Thu, 26 Nov 2009 06:59
27 lines
1986 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:

> Hi D. Stussy,

>> Is a CIDR expression allowed with a hostname (for hosts or localaddress
>> in the auth group section of the file), or is it only for IP address
>> literals?

> I do not understand the point you want to make.  Did you try and it
> didn't work?

If I understand correctly, he wants to write something like:

    foo.example.com/23

and have it do an IP address lookup for foo.example.com, figure out what
the corresponding /23 network that contains it, and allow access to that
network.

That isn't currently supported.  This is the first time anyone has
mentioned doing such a thing.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN's readers.conf: CIDR with hostname?
#82217
Author: Bo Lindbergh
Date: Thu, 26 Nov 2009 14:06
20 lines
1538 bytes
In article <87k4xdn54a.fsf@windlord.stanford.edu>,
 Russ Allbery <rra@stanford.edu> wrote:

> If I understand correctly, he wants to write something like:
> 
>     foo.example.com/23
> 
> and have it do an IP address lookup for foo.example.com, figure out what
> the corresponding /23 network that contains it, and allow access to that
> network.
> 
> That isn't currently supported.  This is the first time anyone has
> mentioned doing such a thing.

So what happens if foo.example.com has both A and AAAA records?
Using the same prefix length for both IPv4 and IPv6 addresses
is unlikely to be useful.


/Bo Lindbergh
Re: INN's readers.conf: CIDR with hostname?
#82220
Author: Julien ÉLIE
Date: Thu, 26 Nov 2009 18:37
31 lines
2311 bytes
Hi Russ,

>> I do not understand the point you want to make.  Did you try and it
>> didn't work?
>
> If I understand correctly, he wants to write something like:
>
>    foo.example.com/23
>
> and have it do an IP address lookup for foo.example.com, figure out what
> the corresponding /23 network that contains it, and allow access to that
> network.

Ah, OK, I now see.  Thanks!


> That isn't currently supported.  This is the first time anyone has
> mentioned doing such a thing.

It is true that it is not mentioned in RFC 4632 about CIDR.

   In CIDR notation, a prefix is shown as a 4-octet
   quantity, just like a traditional IPv4 address or network number,
   followed by the "/" (slash) character, followed by a decimal value
   between 0 and 32 that describes the number of significant bits.

-- 
Julien ÉLIE

« Dulce et decorum est pro patria mori. » (Horace) 
Re: INN's readers.conf: CIDR with hostname?
#82222
Author: D. Stussy
Date: Thu, 26 Nov 2009 22:19
30 lines
2384 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message
news:87k4xdn54a.fsf@windlord.stanford.edu...
> Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> >> Is a CIDR expression allowed with a hostname (for hosts or
localaddress
> >> in the auth group section of the file), or is it only for IP address
> >> literals?
>
> > I do not understand the point you want to make.  Did you try and it
> > didn't work?
>
> If I understand correctly, he wants to write something like:
>
>     foo.example.com/23
>
> and have it do an IP address lookup for foo.example.com, figure out what
> the corresponding /23 network that contains it, and allow access to that
> network.
>
> That isn't currently supported.  This is the first time anyone has
> mentioned doing such a thing.

Thanks Russ.  That was exactly my question, and I had a feeling from the
documentation that it wasn't supported (from the way the section was
written), but asked just to make certain.

Alot of other programs do have this functionality (Apache and iptables
immediately come to mind).

Re: INN's readers.conf: CIDR with hostname?
#82223
Author: D. Stussy
Date: Thu, 26 Nov 2009 22:37
41 lines
3135 bytes
"Bo Lindbergh" <blgl@hagernas.com> wrote in message
news:hem1ve$b3a$1@aioe.org...
> In article <87k4xdn54a.fsf@windlord.stanford.edu>,
>  Russ Allbery <rra@stanford.edu> wrote:
> > If I understand correctly, he wants to write something like:
> >
> >     foo.example.com/23
> >
> > and have it do an IP address lookup for foo.example.com, figure out
what
> > the corresponding /23 network that contains it, and allow access to
that
> > network.
> >
> > That isn't currently supported.  This is the first time anyone has
> > mentioned doing such a thing.
>
> So what happens if foo.example.com has both A and AAAA records?
> Using the same prefix length for both IPv4 and IPv6 addresses
> is unlikely to be useful.

1)  If the CIDR length is >32, it is obviously for IPv6.  For exactly 32,
there's no need for it to be specified in IPv4 (as opposed to omission), so
that case can also be deemed for IPv6 only.  "/0" won't matter which AF is
chosen as that allows everything.  As networks for IPv6 are assigned
"/32's" as their largest unit of assignment by the regional RIRs, I don't
see a problem with "/1" ... "/31" being assumed to be IPv4 when both types
of addresses resolve.  Ranges for IPv6 between "/1" and "/31" would
probably have to use an address literal anyway, but if a hostname is
desired, then it's up to the adminstrator to make certain that it does NOT
resolve to any IPv4 address.

2)  Multi-homed entries within the same address family would need to have
the mask applied to each entry.  (Some programs have a bug with this -
selecting only the first entry and ignoring the others within the same AF).
However, watch out for when the post-mask value is equal.  (Iptables 1.4.5
has that bug - adding a rule N times for N addresses, even when after
applying the subnet mask the network range is the same, thus adding N
identical rules instead of just one).

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads