Article View: news.software.nntp
Article #67619Re: News Reader Software with Radius?
From: Jeffrey M. Vinocur
Date: Sun, 04 Jan 2004 20:01
Date: Sun, 04 Jan 2004 20:01
101 lines
4781 bytes
4781 bytes
In article <Xns946687249D210Vorlon5@207.114.4.10>,
Howard Leadmon <no@spam.net> wrote:
>
> Here is what I need, or would like to have in the software I run. I want
>a good efficient server that can handle the full load of news now days, and
>this does include binaries. So handling binaries it needs to work across
>several thousand gigabytes of spool area.
I actually don't know if INN can do a full feed these days.
>Also as we outsource news to other ISP's as well, I need a way to provide
>access with a specific configuration to them for their users. I also need
>to be able to limit the number of connections that a specific ISP/IP range
>can establish to the server. Finally I would really like to use Radius as
>well for authentication of users for a given ISP/Customer, and limit and
>record details based on this.
Hmm. INN does have a radius authenticator as part of the standard
installation. We're a bit weak on the limitation by IP range stuff, but
the dynamic access block generation feature ought to be sufficient for
rolling your own without too much trouble.
I haven't tried a configuration like this, but I think you could get it
working in a day or two if you've got anybody who knows Perl or Python.
I'm imagining something like this (for anybody who knows INN and is
curious, or would like to comment):
auth "global" {
hosts: "*"
auth: "radius" # Should return user@isp form addresses
perl_access: "ratelimit.pl"
}
And in ratelimit.pl (swiped from the doc/hook-perl example):
# untested
my %hosts = ( "example.com" => "example.*", "isc.org" => "isc.*" );
my $PUBLIC = "comp.*, sci.*"
sub too_fast {
my $isp = shift;
#check for frequent connections by whatever criteria you like
return 0;
}
sub access {
%return_hash = (
"max_rate" => "10000",
"addnntppostinghost" => "true",
# ...
);
if( defined $attributes{username} &&
$attributes{username} =~ /.*@(.*)/ )
{
if( too_fast($1) ) {
$return_hash{"reject_with"}
= "Too many connections from $1";
}
$return_hash{"virtualhost"} = "true";
$return_hash{"path"} = $1;
$return_hash{"newsgroups"} = "$PUBLIC, $hosts{$1}";
} else {
$return_hash{"read"} = "local.announce";
$return_hash{"post"} = "!*";
}
return %return_hash;
}
(To do it in Python, you'd use python_access instead of perl_access; see
the doc/hook-* files for details.)
As a caveat, the BUGS section of the radius manpage:
It has been reported that this authenticator doesn't work
with Ascend RADIUS servers, but does work with Cistron
RADIUS servers. It's also believed to work with Liv-
ingston's RADIUS server. Contributions to make it work
better with different types of RADIUS servers would be
gratefully accepted.
This code has not been audited against the RADIUS protocol
and may not implement it correctly.
But people definitely are using the code (I think panix is, actually, if
I recall the most recent patches that got submitted for radius.c).
>I also do want to be able to use SPAM filtering on the news server
Cleanfeed works with INN.
--
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID:
<bt9re2$erm$1@puck.litech.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news.tdl.com!news.mbo.net!news.litech.org!not-for-mailReferences:
<Xns946687249D210Vorlon5@207.114.4.10>Show Full Headers
Complete Article Headers
Message-ID: <bt9re2$erm$1@puck.litech.org> Subject: Re: News Reader Software with Radius? Date: Sun, 04 Jan 2004 20:01:06 +0000 From: jeff@litech.org (Jeffrey M. Vinocur) References: <Xns946687249D210Vorlon5@207.114.4.10> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news.tdl.com!news.mbo.net!news.litech.org!not-for-mail Newsgroups: news.software.nntp Organization: Litech Systems Design Lines: 101 Sender: jeff@litech.org NNTP-Posting-Host: puck.litech.org X-Trace: puck.litech.org 1073246466 15222 66.218.0.75 (4 Jan 2004 20:01:06 GMT) X-Complaints-To: usenet@litech.org NNTP-Posting-Date: Sun, 4 Jan 2004 20:01:06 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: jeff@litech.org (Jeffrey M. Vinocur)