I am using a Kubuntu 11.10 client with a FreeBSD 9.0 server.
The server has the following lines in /etc/rc.conf
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
and the following in /etc/exports
V4: /
/
I am not using any type of security other than the default sys to keep this config as simple as possible.
From the client, both of these commands successfully mount the exported NFS share:
$ sudo mount -t nfs test.home:/ /mnt
$ sudo mount -t nfs4 test.home:/ /mnt
What can I do on the server end to disable NFSv3 and below so that the following does not work?
$ sudo mount -t nfs test.home:/ /mnt
I got the following answer to this question from the FreeBSD developer who works on the code for NFS. To disable v2 and v3 connections at the server level the following command needs to be run:
If you want the change to permanent on the system then add the following line to
/etc/sysctl.conf
:I just tested this on the setup in my original question and I get the following output about the mounts using the v3 and v4 mount commands:
Notice that both end up with v4 mounts now.