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
eternal-september.org 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:
127.0.1.1 my.fqdn localname
to check what your FQDN is, from the command line type:
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.
I shall put in the details I have configured to use the cheesy server.
Edit the file /etc/news/leafnode/config
expire = 60
server = news.eternal-september.org
username = my_username
password = my_password
hostname = my.fqdn
# ignores some x-posted chaff from Usenet trolls :-)
maxcrosspost = 4
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.