🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #51891

Re: Looking for Leafnode help

#51891
From: bruce
Date: Sat, 30 Oct 2004 19:43
234 lines
11571 bytes
No One <noone@yahoo.com> wrote:
> Whiskers wrote:
>> On 2004-10-28, No One <noone@yahoo.com> wrote:
>> > I downloaded Leafnode and Leafwa (the PHP version).  I have leafnode
>> > configured and it does get a list of newsgroups from my feed.  I cannot,
>> > however, get a client to connect when leafnode is running.  Leafwa does
>> > see the list of newsgroups.
>>
>> Point your client at localhost or 127.0.0.1 (assuming the client is on the
>> same machine as leafnode).
>>
>> Some clients, such as slrn, work best if the NNTPSERVER variable is set; I
>> have this line in my ~/.bash_profile
>>
>> NNTPSERVER=127.0.0.1 && export NNTPSERVER
> 
> The server and client are not on the same machine, but are on the same local
> network.

Did you read the INSTALL file that came with leafnode? Below is the relevant
section. If you have further problems, please use the mailing list:
leafnode-list@dt.e-technik.uni-dortmund.de (Subject: subscribe to
subscribe).

=== leafnode-1.10.5.rel/INSTALL:
10. (as root) Edit /etc/hosts.deny to add a line:
    leafnode: ALL

    Edit /etc/hosts.allow to add a line:
    leafnode: 127.0.0.1

    If you run leafnode in a LAN, you can of course add netmasks for the hosts
    in your LAN, like (still to /etc/hosts.allow):

    leafnode: 127.0.0.1 192.168.0.0/255.255.255.0

    See man hosts_access(5) and hosts_options(5) for more information.

11. How leafnode is actually started, depends on what facilities systems
    provide for. USE EXACTLY (ONLY) ONE OF THESE SUGGESTIONS IN THE SUBSECTIONS
    OF THIS SECTION. IF IN DOUBT, GO FOR 11c with tcpserver's native access
    control (the line with -x and with tcprules).

    A WORD OF WARNING: regardless of how you do access-control, do not use
    name-based access control unless you know what you're doing. Use IPs (like
    1.2.3.4) instead. Do not use names that point to dynamic IP addresses or
    use dynamic IP addresses for access control!

    a) Traditionally, the software to start network daemons on demand was
       inetd, and it still is on e. g. HP-UX 10, Solaris 8, *BSD and others --
       see section 11a below. However, most inetd implementations have design
       flaws, so this way is only recommended on FreeBSD for now.  The
       configuration file for inetd is usually /etc/inetd.conf or
       /etc/inet/inetd.conf.

    b) Then, xinetd has joined in and is now the default on Red Hat Linux, it
       is described in section 11b.

    c) Another possibility is to use Dan J. Bernstein's daemontools and
       ucspi-tcp packages, but like all DJB-ware, their installation is easy,
       but different from that of most other packages. The installation is
       described in section 11c (automatic) and 11d (manual).

11a.ONLY WHEN USING INETD (Beware, most systems ship xinetd nowadays, look
    below at 11b. instead)

    (as root) Edit /etc/inetd.conf so that $(BINDIR)/leafnode is executed for
    incoming NNTP connections.  Here is my inetd.conf line (insert it at the
    leftmost column, without leading spaces!):

    nntp stream tcp nowait news /usr/sbin/tcpd /usr/local/sbin/leafnode

    This starts leafnode for all connections on the nntp port, subject to
    /etc/hosts.allow and /etc/hosts.deny screening.  If you don't have
    /usr/sbin/tcpd, fetch the tcp_wrappers package and install it.

    Using leafnode without tcpd is not supported and opens your computer to
    abuse (even happens on modem lines that are only connected during the
    fetch!)

    After these changes, force inetd to read the changed configuration file by
    sending it the HANGUP signal. To achieve this, issue the following command
    (as root):

    kill -HUP `cat /var/run/inetd.pid`

    Proceed to step #12.

11b.ONLY WHEN USING XINETD
    (as root)

    xinetd versions before 2.3.10 are not supported. It may or may not work for
    you with older versions.

    More documentation is available in the xinetd and xinetd.conf manual pages.
    Try man xinetd.

     a. check if your /etc/xinetd.conf has a "includedir /etc/xinetd.d" line.
	If it has, store the configuration snippet below as
	/etc/xinetd.d/leafnode. If your xinetd.conf does NOT have that
	includedir line, append the configuration snippet to your
	/etc/xinetd.conf.

     b. After you have figured which of the two files to edit (or create), add
	this to the xinetd configuration file:

	service nntp
	{
	    flags           = NAMEINARGS NOLIBWRAP
	    socket_type     = stream
	    protocol        = tcp
	    wait            = no
	    user            = news
	    server          = /usr/sbin/tcpd
	    server_args     = /usr/local/sbin/leafnode
	    instances       = 7
	    per_source      = 3
	}

    This allows at most 7 leafnode connections. At most 3 connections are
    allowed from the same client host at the same time. Adjust these figures if
    necessary.

    Send xinetd a USR2 signal. Figure its PID with ps ax | egrep '[x]inetd' on
    Linux or *BSD or ps -ef | egrep '[x]inetd' on SysV machines (Solaris), then
    do: kill -s USR2 12345, replacing 12345 with the PID you just found out.

    Proceed to step #12.

11c. (as root) AUTOMATIC INSTALLATION WITH DAEMONTOOLS AND UCSPI-TCP

    Scope: this installation will configure to run tcpserver for leafnode, with
    native ("tcprules") access control that (by default) allows connections
    from 127.0.0.1 and listens on that address.

    If you want to use hosts.allow/hosts.deny, please go to section #11d.

    a. Before you can proceed, you need to install Dan J. Bernstein's
       daemontools and ucspi-tcp, available from
       http://cr.yp.to/daemontools.html and http://cr.yp.to/ucspi-tcp.html --
       for IPv6 support, you'll also need Felix von Leitner's IPv6 patch from
       http://www.fefe.de/ucspi/. Make sure that svscan is running.

    b. Run setup-daemontools.sh. This will configure everything.  leafnode is
       ready to accept connections from localhost (127.0.0.1).

    c. Configuration hints that relate to this setup (listening IP,
       access control, maximum number of clients) are in README-daemontools.

11d. (as root) MANUAL INSTALLATION WITH DAEMONTOOLS AND UCSPI-TCP
    a. Before you can proceed, you need to install Dan J. Bernstein's
       daemontools and ucspi-tcp, available from
       http://cr.yp.to/daemontools.html and http://cr.yp.to/ucspi-tcp.html --
       for IPv6 support, you'll also need Felix von Leitner's IPv6 patch from
       http://www.fefe.de/ucspi/

    b. create a "log" directory in your leafnode config directory:
       mkdir /etc/leafnode/log

    c. create a "run" file in this directory with your favourite text
       editor:

       #! /bin/sh
       exec logger -p daemon.notice -t leafnode

    d. chmod 755 log/run

    e. create a "run" file in your leafnode configuration directory.

       Here are two possibilities: one will use the regular hosts.allow and
       hosts.deny mechanism, the other will use tcpserver's native access
       control.

       FOR hosts.allow, use something similar to this:

       #! /bin/sh
       exec 2>&1
       exec /usr/local/bin/tcpserver -c10 -l0 -H -v 127.0.0.1 119 \
       /usr/local/bin/setuidgid news /usr/local/bin/argv0 /usr/sbin/tcpd \
       /usr/local/sbin/leafnode

       You may need to adjust the paths if your software is in a non-standard
       location, and you must of course replace 127.0.0.1 with an IP of the
       leafnode computer that is visible in your entire LAN.

       The options are explained below.

       FOR tcpserver's native access control, use something similar to
       this:

       #! /bin/sh
       exec 2>&1
       exec /usr/local/bin/tcpserver -c10 -l0 -H -v -x nntp.cdb \
       127.0.0.1 119 \
       /usr/local/bin/setuidgid news /usr/local/sbin/leafnode

       As above, adjust the paths and the IP.

       -c10 means: allow at most 10 connections at the same time. -l0 means: do
       not look up the local hostname, but use "0" instead (leafnode will do
       that by itself rather than looking at tcpserver's data). -H means: do
       not look up the remote computer's name (leafnode will do that as well).
       -v means: log connections. -x file means: use file as access control
       data base (compiled by tcprules) and refuse connections if it's missing.
       More information is in http://cr.yp.to/ucspi-tcp/tcpserver.html

    f. ONLY if using tcpserver's native access control:
       Create a nntp.rules file that defines the access, an example:

       joe@1.2.3.4:allow
       fool@192.168.0.4:deny
       192.168.0.:allow
       :deny

    g. ONLY if using tcpserver's native access control:
       compile the nntp.rules file into nntp.cdb:
       tcprules nntp.cdb nntp.tmp <nntp.rules
       YOU MUST REPEAT THIS EVERY TIME YOU CHANGE THE RULES FILE!
       (tcpserver will - just as tcpd - detect changes to the rules file
       by itself, no need to SIGHUP it).

    h. chmod 755 run

    i. create a symlink into /service:
       ln -s `pwd` /service/

    svscan should notice the new leafnode service within 5 seconds and
    start it.
===
-- 
Joshua 'bruce' Crawford ... http://www.geocities.com/mortarn

Use a WIMP (Windows Icons Mouse Pulldowns) interface - or an interface with
a CLUE: Command Line User Environment.
Technical Details
Message-ID: <rg7d52-7ef.ln1@ID-92747.user.uni-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20140909.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-north.connect.com.au!not-for-mail
References: <418131CF.D39B7323@yahoo.com> <fi0852-hde.ln1@ID-107770.user.uni-berlin.de> <418174A4.A15842E6@yahoo.com>

Show Full Headers
Complete Article Headers
Message-ID: <rg7d52-7ef.ln1@ID-92747.user.uni-berlin.de>
Subject: Re: Looking for Leafnode help
Date: Sun, 31 Oct 2004 06:43:55 +1100
From: bruce <mortarn_usenet@yahoo.com.au>
References: <418131CF.D39B7323@yahoo.com> <fi0852-hde.ln1@ID-107770.user.uni-berlin.de> <418174A4.A15842E6@yahoo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20140909.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-north.connect.com.au!not-for-mail
Newsgroups: alt.free.newsservers
Organization: Customer of AAPT Pty Ltd
Lines: 234
Sender: bruce <mortarn@bruce.home.invalid>
Reply-To: joshua_gordon_crawford@yahoo.com.au
NNTP-Posting-Host: acc1-ppp104.mrn.dialup.connect.net.au
X-Trace: news-02.connect.com.au 1099165468 18127 210.10.236.104 (30 Oct 2004
X-Complaints-To: abuse@connect.com.au
NNTP-Posting-Date: Sat, 30 Oct 2004 19:44:28 +0000 (UTC)
X-Editor: Joe 3.1 <http://www.sourceforge.net/projects/joe-editor>
X-Face: %G&<y%SJ96t;
 St32dG)[WXf#^E:4+S3WA-Q~wwhB?<W[L"^fx<x$+7f:b\--.v[<fzd~H'!
 \#2Uk>zh, _?*SB~}sHb6h?Ey`/N3\h'Ku23xdY&RV0X&qI:V)t\ISX4C+k/D4G?{%u:hs>xJ!QMyh9
 #)(qv0YNZ*cOi,J8eq-\xkl('(oGp>5t$;h
X-GnuPG-Key: <http://www.geocities.com/mortarn/misc/bruce.txt>
X-ICQ: 71445285
X-MSMail-Priority: High
X-Marks: the spot
X-Message-Flag: Linux: The Choice of a GNU Generation
X-Operating-System: Slackware Linux 10.0 <http://www.slackware.com>
X-Registered-Linux-User: #173468 <http://counter.li.org>
X-Tagline: Why isn't 'palindrome' spelt 'palindromemordnilap'?
X-Uptime: 06:33:56 up 5 days, 22:37, 1 user, load average: 1.33, 1.37, 1.43
X-Virus: Hi! I'm a header virus! Copy me into yours and join the fun!
User-Agent: tin/1.7.6-20040906 ("Baleshare") (UNIX) (Linux/2.4.26 (i686))