Friday, 31 October 2008

Setting up Leafnode on Ubuntu

One of the things that I frequently use tunneling for is Usenet access - particularly as quite a few ISPs block port 119 these days and I can't get on with the Google Groups interface.

Leafnode is a simple and light weight NNTP server which adequately handles my needs.


From the command line:
sudo apt-get install leafnode
and enter details as necessary.


This will very much depend on which upstream NNTP server you use. In my case, I use the cheesy server or as it more formally known. I have an account with them and it is free which works for me.

A note about FQDN and Leafnode.

Leafnode insists that you have an FQDN assigned on your machine which Ubuntu does not necessarily set during installation. Solution 1 is to edit /etc/hosts and assign the FQDN there.

My hosts file looks like this: localhost my.fqdn localname

to check what your FQDN is, from the command line type:

hostname -f
Naturally, you will have to use your own FQDN.

Alternatively, you can configure the FQDN using the hostname= parameter in the leafnode config file. Personally, I prefer the former method rather than the cheat.

Breaking news: It appears that the cheesy server allows registered users to also reserve an FQDN which could be useful for some.

Configuring Leafnode

I shall put in the details I have configured to use the cheesy server.

Edit the file /etc/news/leafnode/config
expire = 60
server =
username = my_username
password = my_password
# optional
hostname = my.fqdn
# ignores some x-posted chaff from Usenet trolls :-)
maxcrosspost = 4

Fetching news

fetchnews likes to be run as user news and I have set my cron job to run every 15 minutes. I have also set the texpire task to run at noon every day to remove expired articles.
sudo crontab -u news -e 
# Sets texpire to clean out news at noon:
0 12 * * * /usr/sbin/texpire 1>/dev/null
# Sets fetchnews to run every 15 minutes:
*/15 * * * * /usr/sbin/fetchnews -vv 2>&1 >> /dev/null

For setting up the tunnel, read my IMAP tunnel article and use port 119 instead :-)

Further reading on automating tunnels can be found on this blog here.


ml2mst said...

Wow! thank you very much, this article was very helpful to me.


prawn said...

Oooh. No problem. Reading it again, I have noticed that the cheesy server has since moved to

I had better update the post ;-)