722 724




Linux Unleashed, Third Edition:Configuring Linux for News





-->















Previous
Table of Contents
Next




NNTP
NNTP can operate in two modes: active and passive. The active mode, as mentioned earlier, is often called pushing and is much the same as CNews’ ihave/sendme protocol in which the sender (client) offers a particular article and waits for the receiver (server) to accept or refuse the article. Push mode has a disadvantage for the server in that it has a high overhead, as each article must be checked in turn.
The passive mode, or pulling, has the receiving machine requesting a list of all articles in a particular newsgroup that have arrived since a specified date. This is done through a newnews command. When the receiving machine has all the articles, it then discards any that are duplicated or not wanted using the article command. This is much easier for the sending machine because it simply sends a mass of articles, but there is a security issue in that the server has to make sure it sends information that is allowed to pass to the receiver.
NNTP is implemented on a Linux system with the NNTP daemon developed by Stan Barber and Phil Lapsley, known almost universally as the “reference implementation daemon” or nntpd. Usually, you only have the source code for the NNTP daemon supplied with a Linux distribution because there are several site-specific details that must be linked into the binary.
The nntpd system consists of a server program and two different client programs (one for pushing and one for pulling). In addition, most Linux nntpd systems include a replacement for the inews program.
An alternative to nntpd is the INN (InterNetNews) package developed by Rich Salz. This is supplied with many Linux distribution packages, as well. INN allows both UUCP and network-based newsfeeds but is really designed for large machines. If you anticipate a lot of newsgroup access, INN may be a better choice than nntpd, although nntpd can handle full newsfeeds almost as well. Because of the relative scarcity of INN and its suitability to larger networks only, we’ll concentrate on nntpd in this chapter. If you want to know more about INN, read the documentation files that accompany the software or download them from an FTP or BBS site. An INN FAQ is frequently posted to the Linux newsgroups on Usenet.
When NNTP receives an article from a remote machine, it passes it on to one of the news subsystems that must be in place. Usually, this is rnews or inews. (You can also use NNTP for batching of articles, explained earlier in this chapter, in which case the relaynews program handles the batch of articles.) NNTP uses the /usr/lib/news/history file to properly perform some protocol transfers, so this file must be configured correctly.
Installing the NNTP Server Program
The NNTP server, nntpd, is usually supplied as source code only, as mentioned earlier. Typically, it must be compiled on your machine to include machine-specific information. The configuration of nntpd is performed through a utility program usually stored as /usr/lib/news/common/conf.h. You can search for the program with the command:


find / -name conf.h -print


Run this program (which is a number of macros) and answer all the questions about your system.

Begin the NNTP installation process by creating a directory in which nntpd can store incoming articles. You should create this directory as /usr/spool/news/.tmp (or /var/spool/news/.tmp). The ownership of the directory must be set to news. The two commands to perform these steps are:


mkdir /usr/spool/news/.tmp
chown news.news /usr/spool/news/tmp


The NNTP server can be configured in one of two different modes. The first is as a standalone server, which starts itself from the rcstartup files (usually rc.inet2) when the Linux system is booted. Alternatively, nntpd can be configured to be managed through inetd, instead of running all the time.
If you are configuring nntpd to run as a standalone daemon, make sure there is no line in the /etc/inetd.conf file that calls the daemon (this is discussed in a moment). Check the /etc/inetd.conf file for potential conflicts with the nntpd daemon started in the rc files.
If you want to configure nntpd to run through inetd, which can reduce the overall load on your system except when news must be processed, you need to add an entry to the inetd configuration file, usually stored as /etc/inetd.conf. The following line should be added to this file with an ASCII editor:


nntp stream tcp nowait news /usr/etc/in.nntpd nntpd


There may be a line like this already in the inetd.conf file, commented out. In this case, verify that the line reads the same as the one above and remove the comment symbol.
Whether you are configuring nntpd to run standalone or started by inetd, you also to need to verify that there is a line for the nntp service in the TCP /etc/services file. There should be a line like this


nntp 119/tcp readnews untp


in the /etc/services file. It will probably be commented out when you install most versions of Linux, so remove the comment symbol.



Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
mbdch20 724
demo cgi 724
Nuestro Circulo 724 DIEGO FLORES 23 de julio de 2016
Egzamin Zawodowy Elektryk 724(01) 2008
avt 722 Rozraśniacz oświetlewnia w samochodzie
Emocje streszczenie rozdzialow 721 724
724 (2)
avt 724 Uniwersalny układ czasowy
719 722
719 722
Analog Nov 73 @ Goulart, Ron @ Regarding Patient 724
722 (2)

więcej podobnych podstron