πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #86920

Re: help please - readers.conf setup + authentication via port 563

#86920
From: Avon Kerr
Date: Sun, 30 Aug 2015 01:25
154 lines
6355 bytes
Hi Julien.

On Sat, 29 Aug 2015 17:22:09 +0200, Julien Γ‰LIE wrote:
 
> Is there a special reason for using port 563?
> I mean:  do you need a secure session (whatever the port) or do you need
> a secure session via port 563 only?

Well, no, other than the fact the documentation for nnrpd seemed to 
suggest that if I wanted to offer TLS then I should set it up on TCP port 
563. I was unaware I could offer it on port 119 as well??


> 
> According to the logs you provide, the connection via port 119 is
> secured (a TLS session has been negotiated).

Interesting, as I just read the log in a way that it had fallen back to 
port 119 and assumed it was not a secure session anymore.

> 
> 
> Note that it is the preferred way to do, per RFC 4642:
>      https://tools.ietf.org/html/rfc4642
> 
>     In some existing implementations, TCP port 563 has been dedicated to
>     NNTP over TLS.  These implementations begin the TLS negotiation
>     immediately upon connection and then continue with the initial steps
>     of an NNTP session.  This use of TLS on a separate port is
>     discouraged for the reasons documented in Section 7 of "Using TLS
>     with IMAP, POP3 and ACAP" [TLS-IMAPPOP].
> 
>     This specification formalizes the STARTTLS command already in
>     occasional use by the installed base.  The STARTTLS command
>     rectifies a number of the problems with using a separate port for a
>     "secure" protocol variant; it is the preferred way of using TLS with
>     NNTP.
> 

Curious, the TLS Support section of  the nnrpd docs do not make this clear.


> 
>> Then there's my readers.conf -I am wondering if it is the cause of the
>> fallback to port 119?
> 
> Just a basic question to be sure:  is nnrpd running as a daemon on port
> 563, and pointing to the right readers.conf file?
> See the last section of CHECKLIST:
>      http://www.eyrie.org/~eagle/software/inn/docs/checklist.html


In my case I set up inetd to run the following

nntps stream tcp nowait news /usr/lib/news/bin/nnrpd -S

while /etc/services defines port 563 as nntps


> 
>> auth "localsec" {
>>      key: "localtsl"
> 
> Your readers.conf file looks right to me.
> Note a typo for "localtsl" (instead of "localtls") but it does not
> matter as you spell it twice the same.

Whoops.. thanks, at least the spelling is the same, all be it wrong.

> 
> 
> 
>> Can someone kindly post some feedback or an example readers.conf I can
>> use as the basis to get my port 563 connects working?
> 
> I personally use a readers-ssl.conf file dedicated to the nnrpd that
> runs in daemon mode.
> Mine is pretty straight-forward!


I figured by not running nnrpd in daemon mode I would ensure any changes I 
made to readers.conf would be reflected quickly rather than having to kill 
and then restart a process to make the changes stick.

I guess I could always add a readers-ssl.conf file to /etc/news and add 
the -c /etc/news/readers-ssl.conf

So the full like should like the following ..

nntps stream tcp nowait news /usr/lib/news/bin/nnrpd -c /etc/news/readers-
ssl.conf -S

Is that correct?

> 
> auth "users-ssl" {
>      hosts: "*"
>      auth: "ckpasswd -f /home/news/etc/users-ssl"
> }
> 
> access "users-ssl" {
>      newsgroups: "*"
>      access: RPAN
> }

Thank you for the above, can this also be used for non TLS logins?

I mean even if you had a filename with user:password in it and the 
password had been encrypted by using something like htpassword would a 
user be able to login using plain unencrypted port 119?

By adding a line like auth: "ckpasswd -f /home/news/etc/users-ssl" into an 
auth group that didn't have "require_ssl: true" enabled?

Also do you know if the use of quotation marks is needed when setting a 
key? so is it key: "keyname" or is key: keyname ok to do?

> 
>> There seem to be a number of options assisted with setting up ckpasswd
>> to use user login/password info. What do you guys think is the best way
>> forward? I am wondering about a file created by apache htpasswd as a
>> starting point but really unsure etc..
> 
> It is what I use.  Be sure that the file is not world-readable, but only
> readable by your news user.

I will try and do this, but a bit unsure as to how to point the output of

    % htpasswd -nbd user pass
    user:LIfOpbjNaEQYE

    % perl -e 'print "user:".crypt("pass", "LI")."\n";'
    user:LIfOpbjNaEQYE

to a specific file name... I'll have a go and see what I can figure out.


> 
> If you do not want to use ckpasswd, you can of course use other kinds of
> authentication (via perl_auth or python_auth for instance).  The
> passwords will have to be somewhere anyway (file or database) unless you
> wish to use SASL mechanisms like OPENID20 but I doubt all your users
> will be able to easily authenticate against your news server!

It's all beyond me how to set something like this up but it seems like if 
I want a user to be able to login and create their own account and 
password I would have to set something like this up?

For now even getting a file set up that works on both 119 and 563 for 
people to authenticate and therefore be able to post is my goal..

Best, Paul

Technical Details
Message-ID: <mrtm20$nog$1@news.bbs.geek.nz>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <mrrhtp$ekm$3@news.bbs.geek.nz> <mrsin1$gmg$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <mrtm20$nog$1@news.bbs.geek.nz>
Subject: Re: help please - readers.conf setup + authentication via port 563
Date: Sun, 30 Aug 2015 01:25:20 +0000
From: Avon Kerr <avon@bbs.geek.nz.invalid>
References: <mrrhtp$ekm$3@news.bbs.geek.nz> <mrsin1$gmg$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: Agency Usenet News Server - Dunedin, New Zealand
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 30 Aug 2015 01:25:20 +0000 (UTC)
Injection-Info: news.bbs.geek.nz; posting-host="S8GrWPmMexyhWcasCjq9VaDqtciLHFVbgDggJyACz1I";
 logging-data="24336"; mail-complaints-to="abuse@news.bbs.geek.nz"
User-Agent: Pan/0.140 (Chocolate Salty Balls; Unknown)
X-Received-Body-CRC: 3670693756
X-Received-Bytes: 6390