πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.admin.peering
Article #1623

Re: Newbie question

#1623
From: Eli
Date: Fri, 07 Apr 2023 13:57
39 lines
2287 bytes
On 22 Mar 2023 at 23:49:55 CET, "Julien Γ‰LIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Eli,
> 
>> Another question, is it possible to limit the maximum number of connections
>> per authenticated user? I know this is possible for peers, but can this also
>> be set up for authenticated users? Maybe a setting in readers.conf or nnrpd
>> that I'm overlooking?
> 
> Unfortunately, the response is no.  There's no native way of limiting
> users' connections.
> You may want to write a custom authentication hook (perl_auth or
> python_auth in readers.conf) that would do the job by accounting how
> many connections are open by a given user, and deny access if it exceeds
> the limit.  I am not aware of existing scripts to do that :-(
> 
> It could be worthwhile having though, as you're not the first one to ask
> (but nobody wrote or shared what he came up with).

Hi Julies,

The nnrpd manual states:

"As each command is received, nnrpd tries to change its "argv" array so that
ps(1) will print out the command being executed."

This will then look like this:
nnrpd: <xxx.xxx.xxx.xxx> GROUP
nnrpd: <xxx.xxx.xxx.xxx> XOVER

Is it perhaps also possible to add the authenticated user to this?

Something like:
nnrpd: <xxx.xxx.xxx.xxx> Eli GROUP
nnrpd: <xxx.xxx.xxx.xxx> Eli XOVER

This would make it possible to limit the number of connections per user via a
perl script.
Technical Details
Message-ID: <jjVXL.4378630$vSy3.384664@fx04.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> <tvfr7u$1ua8$2@news.trigofacile.com> <evKSL.4136913$SIb3.775609@fx05.ams4> <tvft64$240m$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <jjVXL.4378630$vSy3.384664@fx04.ams4>
Subject: Re: Newbie question
Date: Fri, 07 Apr 2023 13:57:35 GMT
From: Eli <eliistheman@gmail.com>
References: <sXMOL.4024495$MJk2.1098149@fx06.ams4> <tvfr7u$1ua8$2@news.trigofacile.com> <evKSL.4136913$SIb3.775609@fx05.ams4> <tvft64$240m$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-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.5/l - Full License
Lines: 39
X-Complaints-To: abuse@eweka.nl
Nntp-Posting-Date: Fri, 07 Apr 2023 13:57:35 UTC
Organization: Eweka Internet Services