🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Aioe Tue, 10 Feb 2009 21:19
a few questions about nnrpd and filter_nnrpd.pl
#80125
Author: Aioe
Date: Tue, 10 Feb 2009 21:19
15 lines
1783 bytes
1. With inn 2.5, i see in my logs (news.notice) lines like this:

Feb  9 22:32:54 aioe-casa aioe.org post                                        
[7121]: localhost.aioe.org post ok <gmq7d0$6uh$2@aioe-casa.aioe.org>

nnrpd seems to log the last command sent by the client when each log line is written. Why does nnrpd log in this way? Before understanding, this seems
useless.

2. can filter_nnrpd.pl gracefully *close* a connection from a client? 
There're people who bomb me with hundreds attempts to post spam using a 
single connection. I'm able to ban them through tcpd support inside xinetd
but in this way they're banned when they make an attempt to establish a new connection. I need to block the existing ones without using ipfilter (that 
requires root privileges) and i can't wait till they close their connection. 

Re: a few questions about nnrpd and filter_nnrpd.pl
#80126
Author: Ray Banana
Date: Wed, 11 Feb 2009 06:09
23 lines
2325 bytes
Thus spake Aioe <estasi@aioe.org>
 
> 2. can filter_nnrpd.pl gracefully *close* a connection from a client? 
> There're people who bomb me with hundreds attempts to post spam using a 
> single connection. I'm able to ban them through tcpd support inside xinetd
> but in this way they're banned when they make an attempt to establish
> a new connection. I need to block the existing ones without using
> ipfilter (that requires root privileges) and i can't wait till they
> close their connection. 

/usr/lib/news/doc/hook-perl:

| Notes on Writing Embedded Perl
| [...]
| Calling exit directly, however, *will* kill the innd or nnrpd process,
| so don't do that.

I wouldn't call it "graceful", but if you are desperate enough, this may
do what you want.

-- 
Time flies like an arrow, fruit flies like a Banana.
http://news.motzarella.org
Re: a few questions about nnrpd and filter_nnrpd.pl
#80128
Author: Julien ÉLIE
Date: Wed, 18 Feb 2009 21:17
42 lines
2438 bytes
Hi,

> 2. can filter_nnrpd.pl gracefully *close* a connection from a client?
> I need to block the existing ones without using ipfilter (that
> requires root privileges) and i can't wait till they close their connection.

This feature is now implemented in INN 2.5.0.

Just write:

    return "CLOSE evil spammer";



Index: nnrpd/post.c
===================================================================
--- nnrpd/post.c        (révision 8319)
+++ nnrpd/post.c        (copie de travail)
@@ -1056,6 +1056,12 @@
                return SpoolitTo(article, p, SDir);
             }
        }
+        else if (strncmp(p, "CLOSE", 5) == 0) {
+            syslog(L_NOTICE, "%s post %s", Client.host, p);
+            Reply("%d NNTP server unavailable; no posting\r\n",
+                  NNTP_FAIL_TERMINATING);
+            ExitWithStats(1, true);
+        }
        else
        {
            if (modgroup)




I hope it will be of help,

-- 
Julien ÉLIE

« Aequum est ut cuius participauit lucrum, participet et damnun. » 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads