🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #88839

Re: What methods can throttle INN connections?

#88839
From: Aioe
Date: Sun, 24 Oct 2021 19:37
40 lines
2576 bytes
Il 23/10/21 21:30, 711 Spooky Mart ha scritto:
> Hello NNTP gurus. I want to host a binary local newsgroup. I want to
> discourage spammers from trying to push up irrelevant big binaries,
> vids, pr0n, etc. The purpose of the binary group is for uploading PDF
> and ZIP/XZ/7Z files < 4MB.
> 
> I am seeking ideas on different ways to throttle INN connections.
> 
> [1] Firstly I want to throttle all client connections to max 64kB/s.

if you need a limit for all users, iptables does this
if you need a limit for each user, max_rate does this (see man readers.con)

> 
> [2] Secondly I want to maintain a timing throttle to all client
> connections so that the server does not respond for several seconds
> since the last connection from same client / IP, so that there is always
> a short delay between the completion of one client command or connect to
> the next.

imho it isn't a good strategy
you have to set some thresholds in the system resources used by each IP, 
if one exceeds them you ban it for a certain time
it is not difficult to write a script that reads the logs, builds a 
database of the resources used by each client then bans and unbans it


> [3] Thirdly, if multiple client connections are detected from the same
> IP, I want to throttle bandwidth down to 32kB/s per client and cycle
> their access by alternating the delays. 

iptables does this

> [4] Fourthly, I want to offer the newsgroup to the big world network if
> anyone wants to sync it, with all the binary mimetypes stripped, so the
> outgoing feed would only contain body text without the binary content.

you've to patch idd to do this

Technical Details
Message-ID: <sl4cln$11h6$1@gioia.aioe.org>
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: <sl1nqc$1j4c$1@gioia.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <sl4cln$11h6$1@gioia.aioe.org>
Subject: Re: What methods can throttle INN connections?
Date: Sun, 24 Oct 2021 21:37:27 +0200
From: Aioe <estasi@aioe.org>
References: <sl1nqc$1j4c$1@gioia.aioe.org>
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: Aioe.org NNTP Server
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="34342"; posting-host="9WxlgsACiSVNgeZD4+dK5A.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2