🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #11995

Re: Redirect nnrpd connects

#11995
From: Alan Brown
Date: Wed, 30 Oct 1996 00:00
83 lines
4177 bytes
In article <54l84r$h8l@polo.iquest.com>,
Dougal Campbell <dougal@vespucci.iquest.com> wrote:
>Many moons ago, someone posted here a method which allowed him to
>automagically redirect reader connections to a nonstandard port number
>(where nnrpd lived), allowing for faster connections on a server that's
>sometimes slow to respond to new connections.

Here's what I use on my linux system. The ideas came from this group.

Note that you need the following options in the kernel:

IP aliasing
Firewalling
Transparent proxy

You also need  ipfwadm - the current version is 2.3.0

I decided to make the outgoing and incoming news connections appear on 
different IP addresses as it allowed things to be a little faster for 
incoming newsfeeds.

The orginal server address is 202.36.148.70 (news.manawatu.gen.nz), the 
added address is 202.50.148.71 (newshost.manawatu.gen.nz)

Add these lines to your rc.local (or create rc.multihome and rc,firewall, 
which is what I did - the server is/was also a multihomed web server)

------
ifconfig eth0:0	202.36.148.71	broadcast 202.36.148.255 netmask 255.255.255.0
route add -host	202.36.148.71	dev eth0:0

FW=/sbin/ipfwadm
$FW -I -f

###INN newsfeeds on port 119 are switched to port 1119

### Feeders have been told to send to newshost.manawatu.gen.nz (202.36.148.71)
### Instead of news.manawatu.gen.nz (202.36.148.70), so the ones which have
### switched are commented out.

##$FW -I -a accept -S 202.36.148.70/32 	-D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 202.36.148.65/32 	-D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 130.123.128.11/32	-D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 130.217.96.24/32 	-D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 130.217.76.24/32 	-D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 130.217.188.20/32 -D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 202.36.174.8/32 	-D 202.36.148.70/32 119 -P tcp
##$FW -I -a accept -S 202.36.121.24/32 	-D 202.36.148.70/32 119 -P tcp

## Everyone else gets shunted off to 1119
#
# Uncomment this if we need to switch back to test the latest INN  
# startup performance patches or connect to newshost port 119
$FW -I -a accept -S 0.0.0.0/0 		-D 202.36.148.68/32 119 -P tcp -r 1119
#
## This is another way of doing it, but access lists are better handled 
## by nnrpd/innd IMO. :-) (29/5/96)
##$FW -I -a accept -S 202.36.110.0/24 	-D 202.36.148.70/32 119 -P tcp -r 1119
##$FW -I -a accept -S 202.36.147.0/24 	-D 202.36.148.70/32 119 -P tcp -r 1119
##$FW -I -a accept -S 202.36.148.0/24 	-D 202.36.148.70/32 119 -P tcp -r 1119
##$FW -I -a accept -S 202.50.64.0/19 	-D 202.36.148.70/32 119 -P tcp -r 1119
##$FW -I -a accept -S 203.97.16.0/24 	-D 202.36.148.70/32 119 -P tcp -r 1119
##$FW -I -a accept -S 203.49.49.0/24 	-D 202.36.148.70/32 119 -P tcp -r 1119

--------

I've added the streaming patches related to innd startup performnce on
connects, but I don't think my server starts quickly enough even with them
added. (6-7 sec startup of nnrpd, compared with up to 45 seconds
innd+nnrpd). Additionally, using this method allows people to read news
even if innd has toasted itself - which has saved me a few late night 
calls when combined with the nnrpd spooling patches.

How many OS's can this solution be applied to?


AB
-- 
If you go down to the woods today you're sure for a big surpise: Teddies 
in leather who bang heads together, with black liner round their eyes.

Technical Details
Message-ID: <554sb3$jk6@papaioea.manawatu.gen.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.mbox.zip!not-for-mail
References: <54l84r$h8l@polo.iquest.com>

Show Full Headers
Complete Article Headers
Message-ID: <554sb3$jk6@papaioea.manawatu.gen.nz>
Subject: Re: Redirect nnrpd connects
Date: Wed, 30 Oct 1996 00:00:00 +0000
From: alan@papaioea.manawatu.gen.nz (Alan Brown)
References: <54l84r$h8l@polo.iquest.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.mbox.zip!not-for-mail
X-Deja-AN: 192890048
Content-type: text/plain; charset=iso-8859-1
Organization: PlaNet (NZ) Manawatu, Palmerston North +64 6 357-9245, Levin +64 6 367 9944
Mime-version: 1.0
Newsgroups: news.software.nntp