Con esta guía vamos a configurar Leafnode, yo he seguido los pasos con Mandrake 8.1 y funciona a la perfección. En esta guía encontrarás los pasos básicos para montarlo, si quieres más información, pásate por http://www.leafnode.org, y si quieres ver una copia de seguridad de este archivo en archivo de configuración de leafnode lo tienes.
Suponemos que está leafnode instalado, si no fuera así lo podemos instalar del CD de nuestra distribución, suele venir en la mayoría de ellas, o lo descargamos de ftp.redhat.com. Si lo haces con Debian, puedes hacerlo, apt-get install leafnode.
Tenemos que editar el fichero '/etc/leafnode/config'. Escribimos los datos de nuestro servidor de news, el tiempo que vamos a tener en nuestro ordenador, ...
Si queremos tener más de un servidor, debemos hacer:
server= server1.elque.sea
username= user
password= pass
server= server2.elque.sea
username= user2
password= pass
server= ....
Si tenemos algún servidor con una conexión muy lenta, añadimos, debajo una línea con 'timeout = 60' (sin las comillas)
Si tenemos algún servidor sin la opción de postear, es decir, de 'solo lectura' añadimos una línea 'nopost=1'
En /etc/hosts.deny editamos una línea 'leafnode: ALL EXCEPT LOCAL'. Esto es para asegurarnos que solo nosotros vamos a tener acceso a leafnode.
En /etc/hosts.allow editamos línea, 'leafnode: 127.0.0.1', lo mismo que pasa con '/etc/hosts.deny', aquí permitimos el acceso a nuestra máquina, en 'hosts.deny', denegamos todo acceso.
En /etc/inetd.conf descomentamos la línea: nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode
Si utilizas xinetd, tienes que descomentar /etc/inetd.conf.
Desde consola ejecutamos /etc/rc.d/init.d/xinetd restart o /etc/rc.d/init.d/inetd restart, según tengamos instalado [x]inetd. Esta orden es para reiniciar la configuración actual, también se podría reiniciar, pero no merece la pena, no?
.
telnet 127.0.0.1 119 a leafnode , si funciona , quit, para ver si tenemos acceso al servidor.
Configurar Knode, le dices que el servidor es 127.0.0.1, ya te olvidas de usuario y password, por que estás en tu propia máquina todas las noticias.
Después como root escribimos en el shell /usr/sbin/fetchnews -vvv, para descargarnos los grupos.
Una vez bajados los grupos nos suscribimos en Knode a los que queramos. Para suscribirte hay otra forma de hacerlo mas 'linuxera'
.
En /var/spool/news/interesting.groups, escribimos, como root, touch es.comp.linux, ... así en todos los grupos a los que te quieras suscribir.
Después hacemos su news, metemos la contraseña y /usr/sbin/fetchnews -vvv para descargar encabezados de los grupos suscritos.
Bueno, pues esta es la dificultad que tiene configurar leafnode, se podría hacer más 'complejo', con filtros y demás, pero con esto ya podemos disfrutar de las news en nuestra distro de GNU/Linux.
Leafnode nos permite gestionar los artículos de las news sin necesidad de estar conectados a internet, así como la lectura y escritura de nuestros propios post. Actúa como un servidor de news con lo que necesita una configuración personalizada.
Para ello, aquí dejo el archivo de configuración de leafnode, /etc/news/leafnode/config, para tenerlo como copia de seguridad, y si no sabes como hacer la configuración, en configuración de leafnode de esta misma web, puedes encontrar la guía que hice hace tiempo.
###
# /etc/news/leafnode/config
###
## This is the NNTP server leafnode fetches its news from.
## You need read and post access to it. Mandatory.
server = news.server.es
noactive = 1
nodesc = 1
server = news.server.es
username = username
password = pass
noactive = 1
nodesc = 1
## Unread discussion threads will be deleted after this many days if
## you don't define special expire times. Mandatory.
expire = 30
##
## All the following parameters are optional
##
## Standard news servers run on port 119. If your newsserver doesn't, comment
## out the following line and change it accordingly.
# port = 8000
## Non-standard expire times (glob(7) wildcard constructs possible)
# groupexpire comp.os.linux.* = 5 # groups too big to hold articles 20 days
# groupexpire any.local.newsgroup = 100 # very interesting, hold articles longer
## Never fetch more than this many articles from one group in one run.
## Be careful with this; setting it much below 1000 is probably a bad
## idea.
maxfetch = 20000000
## Fetch only a few articles when we subscribe a new newsgroup. The
## default is to fetch all articles.
initialfetch = 10000
## To avoid spam, you can select the maximum number of crosspostings
## that are allowed in incoming postings. Setting this below 5 is
## probably a bad idea. The default is unlimited crossposting.
maxcrosspost = 5
## If you suffer from repeatedly receiving old postings (this happens
## sometimes when an upstream server goes into hiccup mode) you can
## refuse to receive them with the parameter "maxage" which tells the
## maximum allowed age of an article in days. The default maxage is 10
## days.
maxage = 60
## maxlines will make fetch reject postings that are longer than a certain
## amount of lines.
# maxlines = 100
## minlines will make fetch reject postings that are shorter than a certain
## amount of lines.
# minlines = 2
## maxbytes will make fetch reject postings that are larger
# maxbytes = 50000
## timeout_short determines how many days fetch gets a newsgroup which
## has been accidentally opened. The default is two days.
timeout_short = 2
## timeout_long determines how many days fetch will wait before not getting
## an unread newsgroup any more. The default is seven days.
timeout_long = 90
## timeout_active determines how many days fetch will wait before re-reading
## the whole active file. The default is 90 days.
timeout_active = 100
## If you want to have your newsreader score/kill on Xref: lines, you might
## want to uncomment this.
# create_all_links = 1
## If you want to filter out certain regular expressions in the header,
## create a "filterfile" (how this is done is explained in the README)
## and set
filterfile = /etc/news/leafnode/filters
## If your newsreader does not supply a Message-ID for your postings
## Leafnode will supply one, using the hostname of the machine it is
## running on. If this hostname is not suitable, this parameter can be
## used to override it. Do not use a fantasy name, it may interfere with
## the propagation of your messages. Most modern newsreaders do provide
## a Message-ID.
hostname = local.localhost.com