NFS server behind firewall

That strikes me as being a bit of a long shot, since nfs-kernel-server wasn’t installed on my 16.04 VM. As I said a few posts back:

I’ll try to create a new 18.04 VM from scratch this evening.

Edit: Looking at my rig, it seems that the original 16.04 instance came from using a “netboot” iso Index of /ubuntu/dists/xenial-updates/main/installer-amd64/current/images/netboot Nevertheless, I’ll download the full 18.04.1 server iso for this test.

I got it working!!!
From this article NFSv4Howto - Community Help Wiki

Note with remote NFS paths
They don’t work the way they did in NFSv3. NFSv4 has a global root directory and all exported directories are children to it. So what would have been nfs-server:/export/users on NFSv3 is nfs-server:/users on NFSv4, because /export is the root directory.

So according to above article I modified /etc/exports file on server like this:

/export			10.0.0.0/24(rw,fsid=0,no_subtree_check,sync)
/export/video		10.0.0.0/24(rw,sync,no_wdelay,no_subtree_check,insecure_locks,all_squash,anonuid=1000,anongid=100)

and mounted it on vero:

osmc@osmc:~$ sudo mount -v -t nfs 10.0.0.3:/video /mnt/video
mount.nfs: timeout set for Wed Oct 17 16:57:18 2018
mount.nfs: trying text-based options 'vers=4.2,addr=10.0.0.3,clientaddr=10.0.0.240

(please notice there is no /exports/video, just /video)
Result:

mount |grep video
10.0.0.3:/video on /mnt/video type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.0.0.240,local_lock=none,addr=10.0.0.3)

So it was my stupid ignorance, I saw that article before but I just blindly copied my old config files that worked on other clients (if it ain’t broken, don’t fix it right).
Going to test whether automount works and then put the firewall on but I’m pretty confident it will work now.

A big thanks to all who contributed with hints and put their effort to trying to reproduce and fix this. I would not be able to fix it without your help!

1 Like

Hi,

I’m glad to here its sorted.

Thanks Tom.