Article View: news.software.nntp
Article #89242Re: readers.conf
From: Julien ÉLIE
Date: Sat, 19 Mar 2022 22:42
Date: Sat, 19 Mar 2022 22:42
44 lines
2477 bytes
2477 bytes
Hi Miner,
> In my example condition '"192.168.1.0/24, !192.168.1.5"' mean
> reject any connection from network 192.168.1.0/24, except
> 192.168.1.5 host.
Ah, OK. The "hosts" parameter behaves differently. It defines which
hosts are allowed.
> How about?..
>
> auth allowed {
> hosts: "192.168.1.5"
> default: "<SUCCESS>"
> }
>
> auth disallowed {
> hosts: "192.168.1.0/24"
> default: "<FAIL>"
> }
>
> access success {
> users: "<SUCCESS>"
> newsgroups: "*"
> }
>
> access fail {
> users: "<FAIL>"
> reject_with: "Not allowed!"
> }
As the last matching auth block applies, the "disallowed" block should
be before the "allowed" block in your example. Otherwise, 192.168.1.5
matches both blocks and therefore the second one ("disallowed") is selected.
In my previous example, I thought you wanted "everyone except for a few
hosts" so "allowed" is before "disallowed". Here, the logic is "nobody
except for a few hosts" so "disallowed" is before "allowed".
--
Julien ÉLIE
« Un petit pås pøur møi, un grånd bønd pøur l'humanité ! » (Kerøzen)
Technical Details
Message-ID:
<t15m9f$hhmm$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<t0krjp$6fh$1@txtcon.i2p> <t12i1g$fkek$1@news.trigofacile.com> <t142go$gncm$1@news.trigofacile.com> <t155s1$bk5$1@txtcon.i2p>Show Full Headers
Complete Article Headers
Message-ID: <t15m9f$hhmm$1@news.trigofacile.com> Subject: Re: readers.conf Date: Sat, 19 Mar 2022 23:42:55 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <t0krjp$6fh$1@txtcon.i2p> <t12i1g$fkek$1@news.trigofacile.com> <t142go$gncm$1@news.trigofacile.com> <t155s1$bk5$1@txtcon.i2p> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.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: Sat, 19 Mar 2022 22:42:55 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="575190"; 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.7.0 Cancel-Lock: sha1:0wa0sglib/mPGlj8Mi0LPcykJZ0= sha256:UUcr6BEeHKikZ3SSyWElVnjNKaKeHyPl9MJvSXObHg0= sha1:lJ4PHa/q7WnNKlwctm9LItdmuYY= sha256:ca4NNVBYIKvTskzViMf5Pw/eOROpgrXc6fHJl6T5zxM= In-Reply-To: <t155s1$bk5$1@txtcon.i2p>