🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89238

Re: readers.conf

#89238
From: Julien ÉLIE
Date: Fri, 18 Mar 2022 18:12
55 lines
2608 bytes
Hi Miner,

> How to accept connections from a few IP addresses and immediately
> reject anything from the same network range?
> 
> I did try to do that, but unsuccessful. inn 2.6.4.
> 
> auth "blah" {
>   hosts: "192.168.1.0/24, !192.168.1.5"
>   default: "<FAIL>"
> }

You need at least 2 blocks:
- "auth" to authorize connections as a news reader and assign an 
identity to that connection;
- "access" to parameter the access (what a given identity is allowed to do).

auth "blah" {
   hosts: "192.168.1.0/24, !192.168.1.5"
   default: "<FAIL>"
}

=> It assigns the identity "<FAIL>" to the users in 192.168.1.0/24 but 
not 192.168.1.5.

You need an access block to say what "<FAIL>" can do.


With that logic in mind, a working readers.conf file to do that is:

auth blah {
   hosts: "192.168.1.0/24, !192.168.1.5"
   default: "<SUCCESS>"
}

access full {
   users: "<SUCCESS>"
   newsgroups: *
}



Of course, more complex cases could be done.  That example gives you the 
logic.  The access block says what the "<SUCCESS>" identity can do.
Connections from an IP which does not match the "auth" block won't be 
assigned any identity, and will be immediately rejected.


More information:
   https://www.eyrie.org/~eagle/software/inn/docs/readers.conf.html

-- 
Julien ÉLIE

« J'aimerais qu'on me lâche les cothurnes ! » (Astérix)
Technical Details
Message-ID: <t12i1g$fkek$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
References: <t0krjp$6fh$1@txtcon.i2p>

Show Full Headers
Complete Article Headers
Message-ID: <t12i1g$fkek$1@news.trigofacile.com>
Subject: Re: readers.conf
Date: Fri, 18 Mar 2022 19:12:00 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <t0krjp$6fh$1@txtcon.i2p>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 18 Mar 2022 18:12:00 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176.143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="512468"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.2
Cancel-Lock: sha1:BQr+lMeoWYmhjKuTu3yCXD0Brbc= sha256:BBFgpx6Dvzzp2GDASW2xUTQVBougC3sL0+CBeg6/Kws= sha1:2z26dFezh9d9Gm9Usq/4F7fuoc4= sha256:xe1x343BkvmVQZhpSrEbYrpcQZMxs33+j7kMTSH2ICQ=
In-Reply-To: <t0krjp$6fh$1@txtcon.i2p>