πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.admin.peering
Article #1589

Re: Newbie question

#1589
From: Eli
Date: Thu, 23 Mar 2023 09:55
47 lines
2941 bytes
On 22 Mar 2023 at 23:35:44 CET, "Julien Γ‰LIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Ah yes, exactly.  That's the reason why this was never implemented in
> INN.  It's not seen as a priority at all, and it's also not trivial to do.
> 
> Issue #23
> "nnrpd currently has no way of limiting connections per IP address other
> than using the custom auth hooks.  In its daemon mode, it could in
> theory keep track of this and support throttling.  It's probably not
> worth trying to support this when invoked via inetd, since at that point
> one could just use xinetd and its built-in support for things like this.
> 
> When started from innd, this is a bit harder.  innd has some basic rate
> limiting stuff, but nothing for tracking number of simultaneous
> connections over time.  It may be fine to say that if you want to use
> this feature, you need to have nnrpd be invoked separately, not run from
> innd."
> 
> 
> So the answer is to use something like "per_source = 5" in xinetd.conf
> and start nnrpd by xinetd.

This makes it possible to limit the number of sessions per IP, but not per
authenticated user account.

1) xinitd starts nnrpd and after this the authentication takes place.
2) nntpd sends the login data to perl_auth, which consults the database for
authorization, as well as checking whether the user has already reached his
maximum connections.

So point 2 is where the problem lies.

Each time the authorization is successful, a 'session' record can be added to
the database. The number of records determines how many sessions are running
for this user.

But as soon as a session disconnects, the record must be removed from the
database. However, nnrpd does not know that the session has been disconnected.
Only xinitd knows this, but it doesn't have the user data, nor can it access
the database.

Perhaps something can be done with the xinitd PID, but even then this will
have to be passed to the perl_auth script.

So here's the problem I can't solve.
Do you have a suggestion?
Technical Details
Message-ID: <ImVSL.1923738$THq2.1183994@fx08.ams4>
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
References: <sXMOL.4024495$MJk2.1098149@fx06.ams4> <tvft64$240m$1@news.trigofacile.com> <tvfv7v$1kh2$1@nnrp.usenet.blueworldhosting.com> <tvfvs0$240m$2@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <ImVSL.1923738$THq2.1183994@fx08.ams4>
Subject: Re: Newbie question
Date: Thu, 23 Mar 2023 09:55:52 GMT
From: Eli <eliistheman@gmail.com>
References: <sXMOL.4024495$MJk2.1098149@fx06.ams4> <tvft64$240m$1@news.trigofacile.com> <tvfv7v$1kh2$1@nnrp.usenet.blueworldhosting.com> <tvfvs0$240m$2@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-mail
Newsgroups: news.admin.peering
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
User-Agent: Usenapp for MacOS
X-Usenapp: v1.26.3/l - Full License
Lines: 47
X-Complaints-To: abuse@eweka.nl
Nntp-Posting-Date: Thu, 23 Mar 2023 09:55:52 UTC
Organization: Eweka Internet Services