Getting FreeNFS Working (With VirtualBox)

December 18, 2015 by author

I had considerable issues achieving this using an Oracle Virtualbox Linux guest and Windows 7. The solution seems to be using this version of FreeNFS with Windows and some specific mount command parameters in Linux, via a VirtualBox NAT interface. The command syntax I used within the (Ubuntu) Linux guest was this:

sudo mount -v -t nfs -o nolock,nfsvers=3,proto=tcp,port=2049,sec=none server_name_or_ip:/ /mnt/nfs

The output on success looked like this:

mount.nfs: timeout set for Mon Dec 21 15:12:36 2015
mount.nfs: trying text-based options 'nolock,nfsvers=3,proto=tcp,port=2049,sec=none,addr='
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying prog 100005 vers 3 prot TCP port 635

Also note (as it’s not entirely obvious) that the rpcbind service (previously called portmap) must be running in Linux. If it’s not started automatically the rpcbind -w command will launch it; confirm with rpcinfo -p.

A few other things I found or that you may find helpful;

  • FreeNFS should be run with Administrator privileges. If it isn’t you’ll find UDP and TCP ports 111, 635 and 2049 are not shown in the output of the Windows netstat -a command.
  • I was sure at one point that disabling the Distributed Transaction Coordinator service in Windows helped, it didn’t.
  • Firewalling wasn’t an issue in Linux (iptables) or Windows (I was using Kaspersky).
  • I also found specifying an incorrect port with -o port=2408 and then using the correct one worked too. I wasn’t happy with this though.
  • The mount command attempts to use NFSv4 by default, I specified v3 with -o nfsvers=3.
  • FreeNFS doesn’t support NFSv2.
  • I had to install ithe nfs-common package to be able to mount NFS volumes. If you don’t have a /sbin/mount.nfs file, you’ll need to do the same.
  • I enabled full rights on the relevant directory to the ANONYMOUS LOGON Windows account. I have no idea if this was necessary.

Here’s the relevant output of the mount -l command on the Linux host, in case its helpful in some way:

server_name:/ on /mnt/nfs type nfs (rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=600,retrans=2,sec=null,mountaddr=,mountvers=3,mountport=635,mountproto=tcp,local_lock=all,addr=

Some rpcinfo output (which didn’t seem to change whether I had things working or not):

$ rpcinfo -s
program version(s) netid(s)                         service     owner
 100000  2,3,4     local,udp,tcp,udp6,tcp6          portmapper  superuser

$ rpcinfo
program version netid     address                service    owner
 100000    4    tcp6      ::.0.111               portmapper superuser
 100000    3    tcp6      ::.0.111               portmapper superuser
 100000    4    udp6      ::.0.111               portmapper superuser
 100000    3    udp6      ::.0.111               portmapper superuser
 100000    4    tcp          portmapper superuser
 100000    3    tcp          portmapper superuser
 100000    2    tcp          portmapper superuser
 100000    4    udp          portmapper superuser
 100000    3    udp          portmapper superuser
 100000    2    udp          portmapper superuser
 100000    4    local     /run/rpcbind.sock      portmapper superuser
 100000    3    local     /run/rpcbind.sock      portmapper superuser

Here’s the related TCP connection (once something was successfully mounted):

$ ss -tn

State      Recv-Q Send-Q           Local Address:Port             Peer Address:Port
ESTAB      0      0           

And what it looks like on the Windows host (note the port translation that has occurred as a NAT interface is being used):

> netstat -an


© 2015 - 2016 Some Guy. All rights reserved.