Category Archives: Networking

Install And Configure Nagios on Ubuntu 14.04 LTS

This is a great blog post on Unixmen about installing Nagios, an open source network and infrastructure software solution, on Ubuntu Server 14.04LTS. Not only does it cover the install but also a basic configuration for monitoring a networked computer.

If you do not know how to install Ubuntu Server 14.04.1LTS then read the following blog post on HowToForge

If you have not got a spare computer lying around but have one with 4Gb of RAM, make it multi-purpose and install VirtualBox on it . Then install Nagios as virtual machine on Ubuntu Server under Virtualbox.

As with everything open source, the only cost is your time to install and your willingness to explore and learn.



How to Stop Ubuntu 11.10 Wireless Dropping Out

Unfortunately Kubuntu and other Ubuntu 11.10 versions are currently (October 2011) suffering from a wireless bug which is causing wireless to drop out.

I’ve been running my wireless access point up until now with WEP encryption, mainly to keep compatibility with older wireless equipment. In case you think I’m mad, the access point spends most of its time switched off and therefore is more secure than WPA!

Initially, I changed the MTU setting to 1500 from Auto (see instructions below) to see if this would fix the problem. Whilst it did not fix it it did get more reliable. Although I could not reconnect as I got an authentication failure

Looking deeper into the problem I noticed in the log files that the wireless was trying to authenticate using WPA and not WEP encryption. This would explain why it could not reconnect even if I reset networking and disabled/ enabled wireless.

As a matter of elimination I changed my access point to WPA-PSK authentication and then changed Kubuntu’s settings and authentication password.

This seems to have resolved my particular problem, which appears to be a bug in how WEP wireless connectivity is handled after a disconnect. 

My laptop is an aging Dell Latitude C640 with an Intel Pro Wireless (IPW2200) wireless G card.

How to change the MTU setting

The MTU (Maximum Transmission Unit) setting for Ethernet should be 1500 bytes.



16 Mbit/Sec Token Ring


4 Mbits/Sec Token Ring






IEEE 802.3/802.2




In Ubuntu this is set to automatic in Network Manager and I suspect this is where the problem arises.

To change the setting in Network Manager:

  1. open Network Manager
  2. Select the Wireless tab
  3. Select your connection
  4. Choose Edit
  5. At the bottom of the page is the MTU setting, enter 1500
  6. Click OK
  7. Exit

or follow these instructions

If you just want to test you can enter from terminal the following command in the format

sudo ifconfig nwif mtu #

where nwif is the network interface name e.g. eth0

# is the MTU number


sudo ifconfig eth1 mtu 1500

If you then wish to permanently store this MTU setting, then from Terminal edit as sudo


and enter as the last line under your network interface settings:

mtu 1500

Below is an example of how it might look

iface eth0 inet static





mtu 1500

Powered by Blogilo

Mini How To… Setting Up Samba (Windows) folder shares in Mythbuntu

In my blog post back in February I went through how to change the Storage Groups to a different drive/ directory.

What I didn’t explain was that by default the Storage Group directories are shared in Samba so that they can be accessed remotely over the network by other computers/ devices e.g. your network enabled TV!

The process is quite simple to do, and because Mythbuntu comes with Thunar as the default file manager, which is unfortunately totally useless as the Thunar Shares Plugin is broken from Ubuntu 10.10 onwards due to dependency issues, I’ll explain how to do this from Terminal.

From Terminal, go to the /etc/samba/ directory

cd /etc/samba/

Edit smb.cfg as sudo

sudo nano smb.conf

You will see something similar to the following:


workgroup = MSHOME

server string = %h server (Samba, Mythbuntu)

log file = /var/log/samba/log.%m

max log size = 1000

syslog = 0

panic action = /usr/share/samba/panic-action %d

dns proxy = no

security = share


comment = TV Recordings

path = /media/data/mythtv/recordings

public = yes

writable = no

create mask = 0777

directory mask = 0777

force user = nobody

force group = nogroup

Edit the path for the following shares:




For example for recordings we change the path from

path= /var/lib/mythtv/recordings


path = /media/data/mythtv/recordings

Save the file:

Press CTRL-o

To exit

Press CTRL-x

Restart Samba

Either reboot the PC

or from Terminal enter:

sudo restart smbd

You will now be able to browse and play your MythTV recording as you did prior to changing the Storage Groups.

Powered by Blogilo

FreeNAS 0.8 Beta 2/12/10 – Installation and Basic Configuration

Back in August I explained how to Install FreeNAS 0.7 Network Attached Storage Server on to a low specification PIII PC with plenty of disk storage.

Back in November iXsystems announced FreeNAS 0.8 Beta with the following changes:

  • FreeNAS 0.8 has undergone a complete rewrite.
  • The GUI has been redesigned to be easier to use and extend. Rewritten using Python and Django.
  • Improved hardware support, faster I/O, better modularity, and easier upgrades (see Note below).
  • The base system has migrated from FreeBSD 7.x and the m0m0wall build system to FreeBSD 8.1-RELEASE and NanoBSD.
  • The installation types have changed; there’s no longer an embedded or full install, nor can the image be installed on a data disk. You must now install FreeNAS onto a dedicated device.
  • FreeNAS 0.8 features ZFS version 14
  • The media centre features of the box have not been reimplemented in the core FreeNAS package. This will be added as an add-on at a later date.

So as the user interface has changed, I though it worth rewriting my August blog post.

One thing to note is FreeNAS version 0.8 currently ONLY supports upgrades to FreeNAS 0.8. It is not possible to upgrade from 0.7 or earlier.

These instructions were written using the FreeNAS 0.8 Beta release of the 02/12/10 running in a VirtualBox VM. I do not recommend using any Beta software for any purpose other than testing, as by it’s nature it is incomplete and undergoing rapid development.

What you Need!

  • One low specification PC, the less power it consumes the better as a NAS box generally gets left on for hours/ days on end. A Pentium III is probably a good starting point, with 512Mb of RAM, but if you are serious about power consumption then an Intel Atom or similar CPU is recommended.
  • A 512Mb (for RC2 this is now 1Gb, thanks to vyccid for letting me know about this change) USB stick (assuming the PC can boot* off a USB device) or a low capacity hard disk on which to install the operating system
  • At least 1 hard disk to store your data.

* If your PC does not support USB boot a work-around is to use


Boot off the FreeNAS 0.8 CD, you will briefly be shown the following screen before the default option is selected and you are taken to the main installation menu.

The main boot menu will then be displayed.

Choose option 1 and select OK

All available physical disk media will now be displayed. In my case below I have one 256Mb hard disk available. This will become the FreeNAS system disk. I will add my data disk later, although this is not a requirement.

Select the disk you wish to install FreeNAS on (remember this disk is only for the operating system) so does not need to be large. Select OK.

Before FreeNAS is installed on the chosen disk, you will get the following warning message. Read it and if happy select Yes.

The disk will now be formatted and the operating system installed.

Once this has completed, the following screen will be displayed. Follow the instruction and then press OK.

On reboot you will be given a FreeBSD login prompt as below.

Enter the username of root and the password of freenas to login.

The first problem you will encounter is that there is no menu for setting the IP address or even a display of what it current IP address is set to! Hopefully, it will be recognised by the FreeNAS developers that this is an oversight.

To display you IP address enter the command ifconfig, you will see something similar to the following screen-shot which shows an IP address of

Setting the IP address is now only possible, unless you like using Vi editing Unix configuration files, via the web interface. Whilst this may seem like a backward step, I think it is a good move as it means that all configuration is now done through the GUI.

Open a web browser and type in the IP address. In our case this is You will then get the login screen.

Enter the defualt username of Admin and the password of freenas

You will be taken to the FreeNAS Home page

The first thing you need to do is change you Timezone in the settings tab, using the drop-down, then click Save Settings.

Setting a Fixed IP Address

To do this, in the toolbar click on Network and then in the Network Settings tab, select Interfaces.

Click Add Interface.

Normally you will select em0 if you only have one NIC in your PC. lo0 should not be used as it is local.

You can give your interface any name you wish but I tend to stick to calling my interfaces eth followed by a number in this case 0.

Then enter an IPv4 IP address, I will use

Click Add Interface.

At this point your connection with your FreeNAS web interface will be lost as you have changed the IP address of the server from a variable DHCP address to a fixed address.

In your web browser change you IP address to the new fixed address. In our example this is

You will be asked to login again and you will then be shown your network interfaces window

Attaching Storage

So far all we have done has been to install the FreeNAS operating system and set a fixed IP address. The next step is to make our FreeNAS server useful and turn it into a network storage device by adding disks.

To do this click on Storage on the FreeNAS toolbar.

Now click Storage Wizard. The following window will be displayed

Enter a Volume Name, we are going to use NASDISK1

Select the file system type, I’m going to use UFS as the future of ZFS remaining opensource under Oracle in currently in question. A real shame as this is a good file system.

Finally select the disk you want to assign to the Volume. I have two ad1 and ad3. I will select ad1.

Click Next>>

You will now get a summary screen of your settings, click Save

Having repeated this process for my second disk, the store screen now looks like the following, showing two active disks.

I’m now going to edit some of the default settings for each of my disks by doing the following:

  1. Click the View Disks button for NASDISK1
  2. The Disks in volume 1 window will appear, click Edit for ad1
  3. I’m going to set the following:

HDD Standby will be set to 30 seconds

Adcanced Power Management will be set to Level 1

Th results will look as follows

Click Update ad1 (ad1) and then repeat for all remaining disks.

Sharing the Disks (Windows Shares)

With the disks mounted and a file system allocated, the next step is to share the disks. In this example I’m going to use Windows Sharing as this is universal to all operating systems.

From the FreeNAS toolbar click on Sharing. The following screen will be displayed

Click Add Windows Share. You will be asked for the following

  • Share Name, in this example I will call it WINShare1
  • Path, this is the disk you want the share to be associated, so in this example we will select /mnt/NASDISK1 from the drop-down menu.

The results will look like the following screen-shot. Click Add Windows Share to save the settings.

Repeat for all remaining disks you wish to share.

Once you have finished your Sharing screen will look similar to the following

With your shares set-up, you now need to start the Windows Shares service. To do this click Services on the FreeNAS toolbar.

Click on the OFF button adjacent to Windows Shares, this will turn on the service, the button will change to ON.

Note: I’m not sure of this is a problem or not, but I found that after setting up the shares, it was necessary to reboot the server otherwise you will be asked for a login id and password and nothing seems to work! This might have been because I enabled the Samba service for the first time for Windows Shares.

When browsing for Windows shares, some reason they appear under the workgroup of MyGroup. This is not configured in /usr/local/etc/smb.conf as the Samba workgroup is set to FREENAS. So I assume must be a unexposed configuration setting in the FreeNAS configuration file and I can’t find a setting in the GUI.


The interface is considerably easier to use when setting up shares, in fact is it very “polished” compared to FreeNAS 0.7. and should attract a lot more non-technical users. The issue of not displaying the default DHCP IP address on boot-up is a problem in this respect and I hope this is addressed before the final release candidate is published.

Currently, in terms of functionality FreeNAS 0.8 does not compare to 0.7 as a lot of the functionality is missing. Anyone planning to move to 0.8 from 0.7 will find that unless they use FreeNAS as a basic NAS server, this is a retro step, especially as there is no upgrade path from 0.7.

From what I can tell, the following functionality is currently missing when compared to 0.7:

  • User Account creation and permission setting on shares – currently absent and this needs to be urgently addressed via the GUI.
  • File Browser and Editor – currently absent
  • Plug-ins – currently absent
  • System Information screen only provides Basic details, Live CPU, Memory and Disk Space Usage is missing
  • The Backup option is missing, as are system packages.
  • Not sure whether a Firewall is present and if it is there is no GUI to configure
  • Users and Groups are missing
  • Only file sharing services are currently present, thing like iTunes, Webserver, and BitTorrent are missing

Hopefully this will be partly resolved in the final release, bearing in mind that this is only a Beta and a lot can change! Furthermore, it would be very unfair to disregard the amount of progress made in the past 12 months in the development of FreeNAS. If this pace continues, then I’m sure it won’t be too long before missing features are restored.

What is very clear is that a lot of effort has been put into making FreeNAS very easy to use. In my opinion the developers have done an really excellent job.

A lot of the missing functionality is because 0.8 is a complete re-write and therefore the developers have had to effectively start from scratch, so the absence of features is very understandable

I really look forward to watching how the FreeNAS 0.8 development progresses in 2011. If most of the missing features in 0.7 are eventually restored in 0.8, then I’m definitely upgrading to what looks like becoming the ‘killer’ NAS solution outside of using dedicated hardware.

Congratulations to the FreeNAS team for continuing to create a excellent NAS solution.

Powered by Blogilo

Configuring a Network Switch via the Serial Interface in Linux

I’ve just purchased a rather nice Netgear FMS726 Layer 2 Managed switch t replace my old D-Link 10/100 hub.

Configuring the switch in Linux using VT100 terminal emulation initially proved difficult using xterm and PuTTY. I then stumbled across minicom and this excellent blog at which explains how to connect serially to a device.

Form the Man page on minicom see

Powered by Blogilo

FreeNAS Network Attached Storage Server – Part 1: Installation

The appeal of having a Network Attached Storage “box” on the network is great if you wish to have a central place to store your data. However, NAS boxes are expensive starting around £100 and going up to £600 for a Drobo and that’s before you add the hard disks.

If you are like me, you probably have a PC sitting in the corner looking for a new use, and wouldn’t it be great to turn it into a NAS server, and a FTP server and download bittorrets with it….. Well your can, and using FreeNAS you can have it all for free!

In my case this is a Pentium III 800MHz Compaq Deskpro EN tower, maxed out with 512Mb of RAM and a Promise PCI SATA/ IDE card to manage large 250Gb+ hard disks. For FreeNAS this is quite a high spec PC as it can run with 256Mb RAM and a Pentium II CPU!

FreeNAS is an open source Linux distribution based on FreeBSD It works as a preconfigured "software appliance". Like any appliance, it needs to be set-up and this is mainly done through a very user friendly web interface.

The following instructions will walk you through installing FreeNAS.

FreeNAS can be downloaded from

Installing FreeNAS Server

Boot off the FreeNAS CD, you will get a boot menu with a countdown timer, allow the PC to boot with the default boot option.

Once booted you will get a menu similar to that below

Select option 9) Install/ Upgrade to hard drive/ flash device, etc.

You will be presented with a number of options as FreeNAS can be installed on a variety of different types of media including USB memory sticks.

We are going to choose option 3 ‘full’ OS install to HDD (Hard Disk Drive), the following will be displayed.

Press enter to confirm.

You will then be asked to select the CD ROM drive the FreeNAS CD is in. Select the drive and press enter.

You will now be asked to select the hard disk on to which to install FreeNAS. Again select the drive and press enter.

The FreeNAS installer will ask you to set the size of the FreeNAS partition

Select the default (128Mb) and press enter.

On being asked about whether you would like a swap partition, select No.

The FreeNAS CD ROM will now be mounted and FreeNAS installed.

Once the installation has completed, you will get a message similar to the following

When you press enter, you will be returned to the Console Set-up menu.

Configuring the Network Interface

Select option 2 Set LAN IP address

You will be asked the following

You now have two options:

Option 1 (If you select Yes): DHCP allocated IP Address

The advantage of DHCP is that you don’t have to worry about configuring the IP address, this is by far the lest technical way of setting up the server and works well if you don’t plan to turn it off.

If you select this option, you will then be asked if you wish to configure the network interface for IPv6. For most people, the answer will be No (default). Press enter, after a few seconds you will get a something similar to the following:

This tells us that the FreeNAS server has an IP Address of and the web interface can be accessed by entering in a web browser. The :80 means that the website will be accessed on port 80.

Pressing Enter returns yo to the main menu.

Option 2 (If you select No): Fixed IP Address

If you answer No, you will be asked to enter your own IP address. Make sure that the first three sets of numbers correspond to your network address range. To check open terminal and enter ifconfig. You should see something similar to the following

Enter the first three sets of numbers which make up the inet addr e.g 192.168.1 and then enter the final number which must be available to use. If uncertain, from terminal enter ping followed by the full IP address you wish to use. If you get the Message “Destination Host Unreachable” then it is unlikely that that IP address is being used. Press CTRL+C to terminate the ping.

Enter the fixed IP address you wish to use.

Select OK and press enter.

You will now be asked to enter the subnet mask using CIDR (Classless Inter Domain Routing) notation

The easiest way to work out this two digit number from your subnet mask which in our example we got from doing an ifconfig (see above) is to use a online calculator. I use which is simple to use.

Enter the IP address, and press Go, you will get something similar to the following

In this example the CIDR number is 24. Enter it and select OK.

You will now be asked to enter your default Gateway, this is normally 254, so in this example you would enter

You will next be asked for a DNS IP address. Unless you are running your own DNS server, leave this black and select OK. Other wise enter your DNS server IP address.

You will then be asked if you wish to configure the network interface for IPv6. For most people, the answer will be No (default). Press enter, after a few seconds you will get a something similar to the following

This tells us that the FreeNAS server has an IP Address of and the web interface can be accessed by entering in a web browser. The :80 means that the website is being accessed on port 80.

Pressing Enter returns you to the main menu. You are now ready to login

Logging in to you FreeNAS Server

On a network attached PC, open a web browser and enter the ip address

The following login screen will be displayed

Enter the following login credentials:

Username: admin

Password: freenas

The FreeNAS home page of you server will now be displayed

You have successfully installed your FreeNAS server.

In Part 2, I’ll be looking at configuring FreeNAS and mounting your storage so it is accessible from other computers.

Upgrading Dell C640 from Kubuntu 9.04 to 9.10: How to Recover the Upgrade when it Fails!

Last November I upgraded my trusty C640 to Kubuntu 9.10, only to bottle out post upgrade when I realised the on-board ATI Radeon Mobility M7 video card had a bug causing window display corruption.

With Kubuntu 10.04 due out in a few months and finding the a solution for last years aborted upgraded, I decided to try again.

Problem 1: Refused to Upgrade to 9.10

Kubuntu refused to recognise a distribution upgrade was available, either graphically or via the command line using sudo apt-get dist-upgrade.

I think this might have been due to a recent bug-fix which corrected the GRUB menu, for some unknown reason was showing Kubuntu 8.10 instead of 9.04.

Using the Alternative CD I instigated the upgrade by entering the following from terminal:

sudo mount -o loop ~/Desktop/ubuntu-9.10-alternate-i386.iso /media/cdrom0

Problem 2: Broken Upgrade

I use a wired Ethernet connection when doing upgrades, I don’t trust wireless as it can be unreliable at times, mainly when you need it. As part of the ISO upgrade, I confirmed that I wanted updates from the internet.

Part way through the upgrade I started getting errors about certain OpenOffice deb packages missing from the Alternate CD. As these were not core to the OS working I continued the upgrade. There were a number of related errors and eventually I got a “Upgrade Failed” message, asking me to reboot to recover.

However, I noticed the restart icon had appeared in the plasmoid notification area, so a pretty good indication that the core OS was sound and any problems would be with secondary packages. So instead of doing a restart, I opened up Terminal and entered:

sudo apt-get update

followed by

sudo apt-get upgrade

and was told that I had broken packages, so ran the following

sudo apt-get -f install

then did an upgrade which installed any missing packages (mainly OpenOffice).

As an insurance policy, I re-ran the upgrade process again to make sure nothing had been missed. The laptop was then rebooted and Kubuntu 9.10 loaded, really quickly!

Problem 3: Broken ATI Graphics

This was a known problem, and I had the fix. The only thing to change was replacing GDM (Gnome Desktop Manager) with KDM (KDE Desktop Manager) to adapt it for Kubuntu rather than Ubuntu.

Window corruption with older ATI graphics cards

With older ATI graphics cards with 32MB or less of video RAM some corruption of direct rendered windows, for example OSD notifier windows, might appear. This may be worked around by disabling ‘RenderAccel’ in the Xorg configuration. (426582)

To do this first exit to the console using the following command:


sudo service gdm stop

Then create an Xorg configuration file with the command below:


sudo Xorg -configure

Then add the ‘RenderAccel’ option to /etc/X11/xorg.conf:


Section “Device”

Driver “radeon”

Option “RenderAccel” “off”


And restart X/GDM.

sudo service gdm start

It worked, one reboot and all was fine.

Problem 4: KNetworkManager

Just when I thought it was all fixed, I then tried my wireless connection. It could see the network, but just could not connect.

Because of previous problems under 8.10 with KNetworkManager not always loading successfully on boot, I had added it to AutoStart. I removed this from Autostart and rebooted. KNetworkManager loaded and asked for my wireless access encryption code. Once entered, it connected without a problem.

KNetworkManager has been totally rewritten since 9.04, so it might work reliably. Stranger things have happened!


Despite the above problems, some of which may be unique to my laptops configuration, I think the upgrade to Kubuntu 9.10 was worth it. The whole laptop seems faster and graphics more responsive.

I eagerly look forward to Kubuntu 10.4, hopefully Pulse Audio may start working for a change.

Powered by Bilbo Blogger

Sharing folders and files in Kubuntu 9.04 and 9.10

Prior to KDE4, sharing files in Kubuntu used to be easy, at least I don’t recall having any problems using Konqueur. Then Dolphin replaced Konqueur as the file manager and we went over to KDE4 in Kubuntu and the ability to create new file shares ceased working!

Up until now this has not bothered me as I already had my original file shares setup, but today I need to to setup another to transfer holiday photos between computers and I couldn’t create a file share!

On both of my Kubuntu computers (9.10 (64-bit) and 9.04) I had Samba installed and could browse other Linux and Windows shares without any problems. So not unreasonably I had though that Samba fileshaing in Kubuntu was correctly configured, especially as when you go into folder properties in Dolphin, you have a Share tab, except that by default clicking on “Configure File Sharing..” just brought up the sudo password dialogue box and then did nothing!

The answer to the problem resided in The program, which is supposed to run after you enter you sudo password, is not installed by default when you install the samba client and setup filesharing!

This can easily be checked from Terminal by entering:

kdesudo kcmshell4 fileshare

You will get something similar to

kdeinit4: preparing to launch /usr/lib/

kdeinit4: preparing to launch /usr/lib/

kdeinit4: preparing to launch /usr/lib/

kbuildsycoca4 running…

kdeinit4: preparing to launch /usr/lib/

kbuildsycoca4 running…

kdeinit4: preparing to launch /usr/lib/

findServiceByDesktopPath: fileshare.desktop not found

Entering sudo apt-get install kdenetwork-filesharing installs the missing program and configures the /usr/share/kde4/services/fileshare.desktop file.

Re-entering kdesudo kcmshell4 fileshare will display the “File Sharing – KDE Control Module”.

You will now be able to share files through Dolphin.

This is a stupid usability flaw in Dolphin/ Kubuntu which should never have existed. I’ve updated the bug report in Launchpad with some suggestions.


I have to add that I think Launchpad is a wonderful resource for resolving technical problems in Ubuntu and in many respects is better than the Ubuntu Forum.

Once nice feature is that if there is an outstanding bug, you can track progress on it getting resolved by subscribing to the bug report.

For example, my Nebula DigiTV DVB-T USB receiver ceased working when I upgraded from Ubuntu 8.10 to 9.10. The bug appeared in Ubuntu 9.04 at the kernal level. It has taken over a year to fix it in the kernal, but as of last month it has been confirmed as fixed in kernal release .32 (I’m currently on .31) and eagerly await the .32 release.

Powered by Bilbo Blogger