How to Establish a Local NNTP Server?
I wanted to create a local mirror of the great knowledge sanctuary of EiTI students that is available on the dormitory network in form of a newsgroup. It contains a lot of useful information about various courses, exams, projects and lecturers and I wouldn't like it to suddenly disapear. After short reading and googling I have found the necessary tools - the local NNTP server and a news feeding agent.
INN2 (Internet Net News) is a good choice for local news server. Installation under Debian-like distributions is rather simple:
$ sudo apt-get install inn2
As I will be accessing the news server (local one) from the local machine, I didn't have to introduce any changes to the default configuration apart from changing the expiry rules. I needed to create the group I wanted to mirror locally. When the server was running I have created the new group with the following command:
$ sudo ctlinnd newgroup pw.studia.elka y
In above command y stands for free posting group.
After that I had to configure the program for feeding the local news server (and the other way around). Suck is a small tool for copying news from an NNTP server to a local machine and copying replies back to an NNTP server. It is sufficient to add it to cron to run on periodical basis (though first run should be done manually to check that everything is really ok). So I have tried:
suck news.student1.pw.edu.pl -bp -hl localhost -c -i 0 -M -n


news server
I also did the same thing as you yesterday but from this howto
http://news.aioe.org/article.php3?id_article=18
also can i use any news server not just aioe?
what about the one that comes with my ISP?
my problem is that
a) I am runnunig a mail server with postfix and keep getting this eror message>
-rw-r--r-- 1 news news 82 2006-06-29 10:51 /var/log/news/news.crit
-----
Server running
Allowing remote connections
Parameters c 10 i 50 (0) l 1000000 o 1011 t 300 H 2 T 60 X 0 normal specified
Not reserved
Readers follow enabled
Perl filtering enabled
-----
Jun 29 10:51:23 xstation innd: SERVER cant listen RCreader Address already in use
I don't know what this
I don't know what this message means. Trying googling yields:
groups.google.pl
and some other hits. Maybe one of them is a solution?
rJun 29 10:51:23 xstation innd: SERVER cant listen RCreader Addr
WELL thankyou fond this
http://www.faqs.org/faqs/inn-faq/part3/
subject: (3.3) syslog message: inndstart: inndstart cant bind Address already in use
only problem is that etc/inetd.conf file. is empty
Try netstat -tnap and see
Try netstat -tnap
and see what process is using port 119.
netstat -tnap
here is the result of netstat -tnap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3966/master
tcp 0 0 192.168.1.64:41094 66.102.11.104:80 ESTABLISHED7596/firefox-bin
tcp 0 0 192.168.1.64:41088 66.102.11.104:80 ESTABLISHED7596/firefox-bin
tcp6 0 0 :::22 :::* LISTEN 3985/sshd
tcp6 0 0 :::119 :::* LISTEN 3885/innd
tcp6 0 0 :::25 :::* LISTEN 3966/master
apprently I have been told to disable IPV6 then i will not get error message. but innd is on port119
and pa aux:
news 3885 0.0 0.5 11084 3824 ? Ss 07:35 0:00 /usr/lib/news/bin/innd -p 3,4
robert
But can you connect to the
But can you connect to the innd? If yes then just discard the error message.
can i connect?
.but you can connect to innd
what is the line to try this?
do not expect anything
it is very clear that my message for help is being put to one side
this is ok and i do not expect anything, so please continue to ignore
this is also ok
robert
I write help if I have time,
telnet/log report
here is what happened.
root@xstation:~# telnet
telnet> open XXXXXXXXXXX 119
Trying XXXXXXXXXXX...
Connected to XXXXXXXXXXX.
Escape character is '^]'.
502 You have no permission to talk. Goodbye.
Connection closed by foreign host.
-------------------
log report
jul 1 12:48:54 xstation nnrpd[5852]: ? reverse lookup for 192.168.1.1 failed: Unknown host -- using IP address for access
Jul 1 12:48:54 xstation nnrpd[5852]: 192.168.1.1 (192.168.1.1) connect
Jul 1 12:48:54 xstation nnrpd[5852]: Reading access from /etc/news/readers.conf
Jul 1 12:48:54 xstation nnrpd[5852]: Auth strategy 'localhost' does not match client. Removing.
Jul 1 12:48:54 xstation nnrpd[5852]: No auth realms to check!
Jul 1 12:48:54 xstation nnrpd[5852]: 192.168.1.1 removing irrelevant access group localhost
Jul 1 12:48:54 xstation nnrpd[5852]: 192.168.1.1 no_permission
Jul 1 12:48:54 xstation nnrpd[5852]: 192.168.1.1 times user 0.006 system 0.003 idle 0.000 elapsed 0.106
Jul 1 12:48:54 xstation nnrpd[5852]: 192.168.1.1 time 106 nntpwrite 1(1)
You should setup the access
You should setup the access control rules in the readers.conf config file. It has a man file which gives in-depth description and the file itself should also contain some commented out examples.
I didn't have to change anything because I'm using everything on one machine.
one machine
i am also on one machine, so any diffrence?
Yes, there seems to
Yes, there seems to be:
(17:32:02) mhulboj@milosz2:~$ telnet 192.168.0.49 119
Trying 192.168.0.49...
Connected to 192.168.0.49.
Escape character is '^]'.
502 You have no permission to talk. Goodbye.
Connection closed by foreign host.
(17:32:05) mhulboj@milosz2:~$ telnet 127.0.0.1 119
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
200 unknown InterNetNews server INN 2.4.3 (20050407 prerelease) ready
^]
telnet> Connection closed.
A policy should be added to readers.conf (or localhost policy should be extended).
sample policy
can you give me an example of a policy i might add to readers.conf
or
how to extend localhost policy.
thanks
robert
I would guess that it should
I would guess that it should look somewhat like this:
auth "localhost" {
hosts: "localhost, 127.0.0.1, stdin"
default: ""
}
access "localhost" {
users: ""
newsgroups: "*"
}
auth "localnet" {
hosts: "192.168.0.0/24"
default: ""
}
access "localnet" {
users: ""
newsgroups: "*"
}
something like this
at the moment the settings in the readers.conf look like this
auth "localhost" {
hosts: "localhost, 127.0.0.1, stdin"
default: ""
your suggestion for this is:
auth "localhost" {
hosts: "localhost, 127.0.0.1, stdin"
default: ""
in the default space should I type ""?
or just leave as you suggested?
in the readers.conf also looks like this;
access "localhost" {
users: ""
newsgroups: "*"
access: RPA
your suggession is:
access "localhost" {
users: ""
newsgroups: "*"
now acess RPA mean what please?
and newsgroups "*" means all listed or all newsgroups?
nothing else is uncommented in readers.conf only two examples shown above
your suggestion of:
auth "localnet" {
hosts: "192.168.0.0/24"
default: ""
what does localnet mean?
and since my ip goes from 192.168.1.1 to 64, should it read
192.168.0.0.64?
default in this this case is "" which means what?
finally,you suggest:
access "localnet" {
users: ""
newsgroups: "*"
agin localnet means what? 127.0.0.1 or mydomain.net
users "" means what users from outside who are allowed to connect?
and if so,how to specify?
newsgrups "*"
newsgroups alloed to be accessed by users / how to list newsgroups?
many thanks for your help on this .
Robert
ps i notice everything is between "" two inverted exclamation marks
re: something like this
please if it is possible can you try to fill in some answers to questions in pervoius post with title "something like this"
Robert
Information about the
no help
slight problems with suck
here is output i get from suck--any ideas
lex1@xstation:~$ suck news.zen.co.uk -bp -hl localhost -c -i 0 -M -n
Attempting to connect to news.zen.co.uk
Using Port 119
Official host name: news.zen.co.uk
Address: 212.23.3.119
Connected to news.zen.co.uk
200 Zen Internet NNRP lovejoy.zen.co.uk Service Ready (posting ok)
200 Zen Internet NNRP lovejoy.zen.co.uk Service Ready (posting ok)
Skipping Line: #comp.os.linux.announce -1
Skipping Line: #comp.security.announce -1
Skipping Line: #gnu.announce -1
news.announce.newusers - 1 articles 4567-4567
news.newusers.questions - 1 articles 674435-674435
Elapsed Time = 0 mins 0.24 seconds
2 Articles to download
Deduping Elapsed Time = 0 mins 0.00 seconds
Deduped, 2 items remaining, 0 dupes removed.
Processing History File Elapsed Time = 0 mins 0.00 seconds
Processed history, 0 dupes removed
Total articles to download: 2
6543 Bytes received in 0 mins 0.21 secs, BPS = 31363.2
Closed connection to news.zen.co.uk
Posting Messages to localhost
Article Rejected, deleting: <01-welcome.txt.1151064300@presby.edu> - 437 Unwante
d newsgroup "news.announce.newusers"
Article Rejected, deleting: - 437 Unwanted newsgroup "
news.newusers.questions"
2 Messages Posted
Elapsed Time = 0 mins 0.08 seconds
Cleaning up after myself
/etc/suck/sucknewsrc: Permission denied
Moving newsrc to backup: Permission denied
lex1@xstation:~$
Hi, I don't know what could
Hi,
I don't know what could be the problem, but got two pointers which MAY lead to the solution.
This may be related with some settings of innd (in /etc/news or something similar). I had a problem with old messages which were being sucked buy my local inn server discarded them with an error. I had to change the expiry setting (I don't remember right now what exactly).
As for this one:
This is rather straightforward - you're running suck from the unpriviledged user - and he has no permission to mess with /etc/suck/* files. Running as root or dedicated user with proper permissions should solve this.
all i am trying to do is
thanks for your feed back on my problem with the
news.zen.co.uk line.
The thing what i am trying to do is setup a news server so others can post to any group via simply point there news reader at news.mydomain.net using the default IP port of 119.
or
nntps on port 563 with stunnel.
does this sound ok.
I think I have two choices one through my own news server that comes with my ISP or with news.aioe.org
is there anything more that needs to be done other than install inn2?
robert
I am using local NNTP server
I am using local NNTP server (inn2) for mirroring several groups which are of interest for me. For this purpose I use suck to feed the messages into my local nntp server. This is half of what you need - because I think that your users would like to post articles and you would like to post them to the external server.
I think that you might find this document useful:
How to establish a suck feed...
This tells how to setup the suck feed and the posting of articles. Hope that it will help.
well yes thats correct
Yes thankyou very much.
This is the article i have been following and the reason I posted here
is because I do not understand it fully.
I have i nstalled inn2 also suck.
I have also created a file called cron-allow
in which i have put two user names the two that i use.
its the only two user names i have.
Then I put this line as per the line in the srticle
*/44 * * * * suck news.aioe.org -A -bp -hl localhost -c -i 200 -M -n -Q
Please tell what else I should do this will be a great help,
should I create a user called news?
Please can you help with other parts of the howto?
I haven't done the full
I haven't done the full setup - I didn't need the posting feature. Right now I don't have my linux machine and cannot test the setup.
As for the user news - you should consider it if your default setup runs innd as root.
good news--inn2/suck
Hello
ok thanks for feedback
I now have inn2 up and running.
at xx.xxx) please delete this before postinf this feedback)
this is mt readers.conf.
auth "localhost" {
hosts: "localhosts,127.0.0.1,*,stdin"
default: ""
}
access "all" {
users: " "
newsgroups: "*"
access: RPA
only two problems remain
1) I only want readers to acess and post to following gropus
where you i put this list please.
alt.anonymous*
alt.computer.security
alt.cotse
alt.hacker
alt.privacy*
alt.security*
alt.testing.testing
comp.security.pgp.discuss
sci.crypt
talk.politics.crypto
alt.fan*
if you look here
http://news.aioe.org/article.php3?id_article=18
it shows you how to set up suck.
I have done what they said
line in cron.tab
*/44 * * * * suck news.aioe.org -A -bp -hl localhost -c -i 200 -M -n -Q
(note this has now changed to nttp.aioe.org)
I have created a file called crontab.allow
in this file there is the following entry
admin
mixmaster
news
permissions looks like this:
-rw-r--r-- 1 news news 122 2006-07-05 11:15 sucknewsrc
in etc/news/newsfeeds i have this line
my_feed:*,!control*,!junk*:Tf,H2,Wn:
permissions of etc/news/newsfeeds is:
-rw-r--r-- 1 root root 5007 2006-07-05 14:26 newsfeeds
NOW here below is a message which happens evert 30/45 minutes
please delete web address and headers befor posting please
i cannot understand why at the bottom of message it says
permission denied --also if you have any other thoughts please
let me know
-----------------------------------------
From mixmaster@xstation.xx.xxx Mon Jul 10 07:00:16 2006
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on xstation.xx.xxx
X-Spam-Level:
X-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=ham
version=3.1.0
X-Original-To: mixmaster
Delivered-To: mixmaster@xstation.xx.xxx
Received: by xstation.xx.xxx (Postfix, from userid 1000)
id ED03A390434; Mon, 10 Jul 2006 07:00:15 +0100 (BST)
From: root@xstation.xx.xxx (Cron Daemon)
To: mixmaster@xstation.xx.xxx
Subject: Cron suck nntp.aioe.org -A -bp -hl localhost -c -i 200 -M -n -Q
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
Message-Id: <20060710060015.ED03A390434@xstation.xx.xxx>
Date: Mon, 10 Jul 2006 07:00:15 +0100 (BST)
Invalid default read for new active group, must be <= 0
Attempting to connect to nntp.aioe.org
Using Port 119
Official host name: nntp.aioe.org
Address: 81.174.50.80
Connected to nntp.aioe.org
200 emma.aioe.org InterNetNews NNRP server INN 2.4.3 (20050407 prerelease) ready (posting ok).
200 emma.aioe.org InterNetNews NNRP server INN 2.4.3 (20050407 prerelease) ready (posting ok).
Loading active file from localhost
Reading current sucknewsrc
Deleted group in sucknewsrc, ignoring: #comp.os.linux.announce -1
Deleted group in sucknewsrc, ignoring: #comp.security.announce -1
Deleted group in sucknewsrc, ignoring: #gnu.announce -1
Deleted group in sucknewsrc, ignoring: news.announce.newusers 0
Deleted group in sucknewsrc, ignoring: news.newusers.questions 0
Adding new groups from local active file to sucknewsrc
New Group - adding to sucknewsrc: control
GROUP , unexpected response, 502
Broken connection, aborting
New Group - adding to sucknewsrc: control.cancel
GROUP , unexpected response, 502
Broken connection, aborting
New Group - adding to sucknewsrc: control.checkgroups
GROUP , unexpected response, 502
Broken connection, aborting
New Group - adding to sucknewsrc: control.newgroup
GROUP , unexpected response, 502
Broken connection, aborting
New Group - adding to sucknewsrc: control.rmgroup
GROUP , unexpected response, 502
Broken connection, aborting
New Group - adding to sucknewsrc: junk
GROUP , unexpected response, 502
Broken connection, aborting
New Group - adding to sucknewsrc: local.general
GROUP not found on host
New Group - adding to sucknewsrc: local.test
local.test - 25 articles 57-81
Elapsed Time = 0 mins 0.79 seconds
25 Articles to download
Deduping Elapsed Time = 0 mins 0.00 seconds
Deduped, 25 items remaining, 0 dupes removed.
Processing History File Elapsed Time = 0 mins 0.01 seconds
Processed history, 0 dupes removed
Total articles to download: 25
24 0.0 BPS
23 1813.8 BPS
22 1632.7 BPS
21 2004.7 BPS
20 2153.4 BPS
19 2272.6 BPS
18 2577.4 BPS
17 2774.4 BPS
16 2693.4 BPS
15 2618.6 BPS
14 2573.2 BPS
13 2549.2 BPS
12 2513.9 BPS
11 2517.5 BPS
10 2499.2 BPS
9 2424.4 BPS
8 1994.5 BPS
7 1777.4 BPS
6 1773.8 BPS
5 1669.3 BPS
4 1662.3 BPS
3 1725.6 BPS
2 1603.4 BPS
1 1477.6 BPS
0 1516.3 BPS
19448 Bytes received in 0 mins 12.48 secs, BPS = 1558.8
Closed connection to nntp.aioe.org
Posting Messages to localhost
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: <1152023482@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152023541@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152023888@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152024430@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152024767@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152024706@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152025299@sistrix.com> - 435 Duplicate
Article Not Wanted, deleting: <1152025401@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152025582@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152088207@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152090043@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152090061@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152090112@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152091196@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: <1152091227@nntp2http.com> - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
Article Not Wanted, deleting: - 435 Duplicate
25 Messages Posted
Elapsed Time = 0 mins 0.08 seconds
Cleaning up after myself
/etc/suck/sucknewsrc: Permission denied
Moving newsrc to backup: Permission denied
--------------------------------------------
This message below i reveive once a day
------------------------------------------------------
From news@xstation.xx.xxx Mon Jul 10 06:49:07 2006
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on xstation.xx.xxx
X-Spam-Level:
X-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=ham
version=3.1.0
X-Original-To: usenet
Delivered-To: mixmaster@xstation.xx.xxx
Received: by xstation.xx.xxx (Postfix, from userid 9)
id 80CE0390434; Mon, 10 Jul 2006 06:48:59 +0100 (BST)
To: usenet@xstation.xx.xxx
Subject: Boot-time Usenet warning on xstation
Message-Id: <20060710054906.80CE0390434@xstation.xx.xxx>
Date: Mon, 10 Jul 2006 06:48:59 +0100 (BST)
From: news@xstation.xx.xxx (news)
Old .news.daily file; need to run news.daily?
Post new comment