Howto share your internet connection in Ubuntu.

Since Ubuntu 9.10 Karmic Koala, Ubuntu has an inbuilt way of sharing any connection. There are a couple usage scenarios for this:-

  1. You want to share your mobile broadband connection with other computers on the network
  2. You want to use your Ubuntu machine to extend your network wirelessly e.g. Your laptop is connected to the network via it’s wireless adapter, which is then connected to another machine via a CAT 5 or CAT 6 cable, enabling the other machine to connect to the network and internet.

I wouldn’t envisage using this to share a DSL broadband connection since most people will already be using an ISP supplied router to do this.

Using it is as simple as enabling the method “Shared to other computers” in the network connection in network manager.

This turns your machine into a mini DHCP/DNS server and starts handing out IP addresses in a 10.x.x.x address range. The machine then NAT/routes any traffic coming in on that interface and forwards it to the networks real gateway. I’ve used it a few times now and it works well.


Saorview and Freesat

In a departure from the norm I am going to write today about something not necessarily computer related. Given the “current economic climate” (please remember to adopt serious tone) I would like to tell you how to save a few quid on your monthly TV bill in Ireland with the minimum outlay.

Until the Saorview trial started in October last the only way to receive the Irish channels i.e. RTE1, 2, TV3, TG4 and 3e without a monthly subscription was using a good ole fashioned UHF aerial and analog signal. The quality of this both for picture and sound leaves a lot to be desired. Digital reception is much better, Saorview was officially launched 26/05/11, it is the Irish equivalent of Freeview, and similarly allows digital reception of TV through an aerial. Most people in Ireland are also used to receiving the “British” channels e.g. BBC1, ITV, Channel 4, etc, etc. The best way to receive those without subscription is via a Freesat (or equivalent) box linked up to your old Sky dish, if you have one, or a new dish which comes as part of the kit.

Saorview can be received through a standard wide-band UHF aerial, there will be an accompanying satellite service for people who are unable to receive the terrestrial signal but it hasn’t even launched in trial form yet and will require the purchase of more equipment in the form of a special satellite dish and receiver. The reason for this is that RTE et al can’t afford to purchase enough rights to broadcast across Europe as the BBC can, using the same Astra satellite Sky does. Therefore they have to use a satellite which has a small enough foot print to cover Ireland and only Ireland, hence the need for the equipment. Saorview will not be available through Sky.

You can either spend a little or a lot of money on this. My goal was to get any HD channels available and have PVR functionality into the bargain, whilst spending as little as possible. So I will tell you what I plumped for. For the Saorview I purchased a Fortek kit from for €121 including VAT and delivery, which included the aerial and mounting (as I didn’t already have one). On the Freesat front I went for the ROSS kit from B&Q at €70, not a true Freesat receiver, in that it won’t automatically pick up channel frequency changes. Both boxes are HD capable and both have PVR functionality if you plug external USB storage in.

Official Saorview compatible boxes can be found at

Continue reading Saorview and Freesat

Managing amavisd-new quarantine from the command line

Just a quick one today. It seems to be a recurring problem for me that every once in a while I want to go into Amavisd-new’s quarantine and look for false positives (not that there should be any if it’s setup right). There are a number or graphical ways of doing this but most of them aren’t available in the Ubuntu repositories. The 2 that I could find are Horde-sam and Webmin’s Clamav module (which I have used before and is pretty easy to use if you are command-line averse). I didn’t want to add another service in order to keep resource usage as low as possible so I set about finding a way to check each email from the command line. So firstly to cycle through every quarantined email use the following command in the quarantine directory (normally /var/lib/amavis/virusmails in Ubuntu):-

Continue reading Managing amavisd-new quarantine from the command line

Remove residual config files in Ubuntu – A one liner

I have spent literally hours over the last year or two searching for an elegant way to remove configuration files left over from package installs, in a command line environment, with Ubuntu.

Googling would provide a frustrating list of solutions that would either involve installing extra packages, using a complicated command line, or script, solutions that I would never be happy with and would “redo” the search again, each time I wanted to perform the same task, in the hope of finding something better.

In the end Aptitude and Xargs were my friends. Without further ado ….

Continue reading Remove residual config files in Ubuntu – A one liner

The merits of LXC containers

First of all what are containers? In this context we are referring to Linux running inside a “containerised” environment i.e. an environment which is to all intents and purposes isolated from the main operating system. The containerised environment doesn’t have it’s own kernel or virtualised hardware and runs at native speeds because of this.

In what ways could a containerised environment be useful and desirable from a business perspective? The first use that springs to mind is being able to easily move your dedicated server from one hoster to another (which is the way I use it). You can simply “rsync” the contents of the container from the source hoster, then take the container down, run another quick rsync and start the container at the new hoster. This is really useful, saving hours and possibly days rebuilding the server at the new hoster in a more conventional manner.

Continue reading The merits of LXC containers

A cost effective alternative to KVM over IP switches

Whether in a co-location centre or at a remote site, looking after a server when you aren’t there in person can be a challenge, particularly if you are conscientious and update your servers regularly – updating a Windows server almost always requires reboot, updating a Linux server will require reboot if the kernel has been updated. What happens if the server doesn’t come up after said reboot? This happens more often than might be expected, so I find it desirable to have a way of accessing the server even if the operating system isn’t available. Traditionally this would be provided by a KVM over IP switch, which redirects Keyboard, Video and Mouse input/output via a web server integrated into a box. KVM over IP switches are expensive (the cheapest one I could find at time of print was €250 and doesn’t work well with mice IMO). However, there is an alternative which is elegant and affordable …

Continue reading A cost effective alternative to KVM over IP switches

Boost your mobile broadband, get a HSDPA modem that supports an external antenna.

You are probably at this page because you aren’t getting decent bandwidth and response from your mobile broadband connection. It’s worth noting that even if you use the most expensive ways of boosting the signal you may still receive poor bandwidth and response. This is because there is only so much data that can be carried on the frequencies available, so at times of heavy usage (particularly when there is also heavy phone usage as 3G shares the same radio waves) it doesn’t matter what you do, mobile broadband (or midband as it should really be referred to) will not work well.

Now I have dropped that bombshell I will list the ways of boosting the signal:-

Continue reading Boost your mobile broadband, get a HSDPA modem that supports an external antenna.

Using a Novatel XUA-1 and X950D in Ubuntu

I read an article recently that suggested using a saucepan as a mobile broadband booster and it peeked my interest enough to give it a try. In case I needed to use my Novatel X950D express card with another machine I had already purchased a Novatel XUA-1 USB to Express Card 36 adapter. This, therefore, gave me a way of placing the modem in the middle of a saucepan, which would be nigh on impossible were the modem in it’s rightful express card slot in the laptop.

Unfortunately, however, due to a production issue at the plant my XUA-1 came wired as “bus powered”, which effectively means it tells the operating system it only has 100ma of power available even though that isn’t true. Subsequently the OS – be it Windows or Linux – won’t then allow the X950D to work in conjunction with the XUA-1.

Continue reading Using a Novatel XUA-1 and X950D in Ubuntu