Category Archives: Linux

Configuring NFS in Ubuntu

Configuring NFS in Ubuntu


What is NFS?

NFS stands for Network File System.

NFS allows you to share directories from one computer with another. For example:


Here we have a server with a user called user1 and a laptop with a user called user2.

What we want to do is to see all of user1’s files on the laptop.

With /home/user1’s directory NFS mounted onto the directory /home/user2/zoostorm lets user2 see all user1’s files in the zoostorm directory.

You can modify, delete and add files there.

This is so you don’t not have to use Sneakernet which is sharing files between computers by putting your sneakers on and carrying the files between computers on a floppy disk, CD, DVD or memory stick.

Microsoft stole this idea from UNIX and calls it Simple File Sharing.

This can be very useful for backing up files or partitions from the laptop to the server PC, as servers traditionally have lots more drive space than say, a laptop or netbook.

The Nitty Gritty

On the host server – This is an example i/p address

sudo apt-get update
sudo apt-get install nfs-kernel-server

sudo apt-get update
sudo apt-get install nfs-common

On the client computer – This is an example i/p address

sudo apt-get update
sudo apt-get install nfs-common

Configure the NFS Exports on the Host Server

Open the /etc/exports file in your text editor with root privileges:

sudo vi /etc/exports

We want to create a line for each of the directories that we wish to share.

/home/username *(rw,sync,no_root_squash,no_subtree_check)

You can replace * with one of the hostname formats. Make the hostname declaration as specific as possible so unwanted systems cannot access the NFS mount, i.e.

sudo exportfs -a

Create the Mount Points and Mount Remote Shares on the Client Server

In your home directory create a directory for the mount in my case this is called zoostorm

mkdir /home/chris/zoostorm

sudo mount /home/chris/zoostorm

At this point, you probably will find out that the mount will time out, what the Ubuntu documentation fails to tell you is that the Ubuntu built in firewall
will block the mounts.

Allowing the NFS ports through the firewall

On both the client and server do the following:

sudo apt-get install ufw

sudo ufw enable

The ports you need to allow through the firewall are 111 and 2049

Just to be on the safe side to find out which port NFS is using:

cat /etc/services | grep -i nfs

you should get:

nfs 2049/tcp # Network File System
nfs 2049/udp # Network File System

so NFS is using port 2049.

We now do the following:

sudo ufw allow 111

sudo ufw allow 2049

Now on the client,

sudo mount /home/chris/zoostorm

We have opened the required ports, so this should now work.

Leave a comment

Posted by on January 27, 2015 in Linux


Tags: , , , ,

Armageddon by Linux

Armageddon by Linux

A different post today from my usual Nexus/Ubuntu posts.

Whenever I talk to ‘normal’ people they look blank when I say I use Ubuntu or Linux. I get “Oh no one uses that, its not mainstream” The likes of Terry Lamb insisted that no one used it. He backed down when I pointed out that his own web site did.

These comments made me think about the ignorance of most people who believe the world according to Bill and the ignorance of people in charge of large organizations, the banks, governments, et al.

I remember an experienced UNIX sysadmin guy telling me one day, how he would deal with any company who had the temerity to sack him. The retribution he proposed was severe and could bring a company to its knees if not destroy it. The modus operandi he would use I am obviously not going to mention here because IT WOULD WORK. One of the major UK banks paid me a while ago to do a security audit on all their UNIX machines and I can tell you that even they would not be immune to such an approach, even AFTER the security was tightened.

Banks, if you want to know where you are vulnerable, you know where I am. Don’t say to your shareholders and customers you were not warned!

People are very blinkered in their thinking, they can not, will not, ‘think outside the box’ For example, imagine this:

If I had a ‘magic wand’ that would stop all Linux boxes working, full stop, what would happen? “Not an awful lot” I here you say.

Well, No more Amazon, Facebook, Youtube, Ebay. The Daily Mail readers in the UK would love to see Amazon die as they don’t pay much in taxes over here. Those Daily Mail readers, however, would come to their senses when Tarquin and Amanda’s Christmas Kindles stopped being any use. They would not even be able to share books with friends because of DRM.

It gets worse. It is estimated that 80 – 90% of the Web runs on Linux. No more email, no more e-commerce, ie no shopping online, no online banking and if that sysamin guy got employed by a bank, no more banking.

Take a look at government users of Linux: US Department of defence, US navy submarine fleet, Federal aviation administration, French parliament, the list is almost endless take a look here.

Governments are spending Billions defending the outsides of their systems and not looking inwards to what might be happening there. They are spending all their time looking to the East and ignoring the West

If you are happy losing all of this, ignore what I am saying. Each to their own. You can always move to Pennsylvania and join the Amish.

If you don’t want to go back to those days then share this post with your friends, family, colleagues and don’t tell any terrorists. They will only get ideas. Unless they are already ‘thinking outside the box’ or have that ‘magic wand’ and are waiting to use it.

1 Comment

Posted by on January 20, 2013 in Linux


Tags: , , , , , , , , , , , , , , , , , , , , , , , , ,

Outline mode in Libreoffice Writer


Words (Photo credit: sirwiseowl)

I spent too much time today trying to find out how to do outlining in Libreoffice Write, the same way that you can in Microsoft Word.

It seems after much looking that all Writer have a a window called Navigator which is a very pale imitation of what Word had even in very early incarnations of Word.

Now Writer has some features that are far superior to Word but this omission make Writer unusable for me. I thought that I would look at what the developers think about this.

Their attitude is that they are not a copy of Microsoft Word even if it has features that the users want. This is what I posted to the developers on one thread: ( I am putting my tin hat on now 🙂

<Flame off>

I can understand both sides of the problem here, I have seen many blogs from journalists who support Linux but say that it will never become mainstream until the developers give the users what the users want regardless whether the developers like what the users want or not.

The current situation is like going to a pub who have a Trad Jazz Band on, playing what they like, not what the customers want to hear and the Jazz Band getting upset when all the customers leave.

We all know that Microsoft’s Operating systems still haven’t attained what Linux had years ago, so why do we (Linux users) have to put up with the reverse situation with applications?

It is like you developers being forced into developing without using snippets or syntax checkers just because Mr Gates has them. Bill uses them so we won’t, just to spite him. Rearrange this to make a meaningful sentence:

Spite cutting off face to nose your your.

The danger here is that I and others would be prepared to pay a reasonable amount for the features in Libreoffice that we want.

We all know that is the start of a slippery slope. So, here is the deal, you give us what we want and we will let you use: vi spell nroff troff LatEx awk sed and the pipe character for your word processing.

Just a thought

<Flame on>

I know it wont make any difference, the developers like mummy, know what’s best 🙂


Posted by on December 28, 2012 in Linux


Tags: , , , , , , , , , , , , , ,

%d bloggers like this: