Difference between revisions of "NFS Version 4 Only"

From UVOO Tech Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
Enable verion 4 only by disabling 2 and 3 (2 is already disabled on modern os)
 
Enable verion 4 only by disabling 2 and 3 (2 is already disabled on modern os)
 
- https://wiki.debian.org/NFSServerSetup
 
- https://wiki.debian.org/NFSServerSetup
 +
- https://help.ubuntu.com/community/NFSv4Howto
  
 
/etc/default/nfs-kernel-server  # update
 
/etc/default/nfs-kernel-server  # update
Line 30: Line 31:
  
 
and all traffic goes over 2049 unencrypted with only ip address access restrictions. Very simple, very fast.
 
and all traffic goes over 2049 unencrypted with only ip address access restrictions. Very simple, very fast.
 +
 +
/etc/exports
 +
```
 +
/101f8f6a-e761-11eb-8e23-afa707071684    192.168.1.10(rw,sync,no_subtree_check,insecure,root_squash)
 +
```
 +
 +
/etc/fstab
 +
```
 +
nfshost:/101f8f6a-e761-11eb-8e23-afa707071684 /opt/localnfshare nfs4  _netdev,auto  0  0
 +
```

Revision as of 00:49, 18 July 2021

Enable verion 4 only by disabling 2 and 3 (2 is already disabled on modern os) - https://wiki.debian.org/NFSServerSetup - https://help.ubuntu.com/community/NFSv4Howto

/etc/default/nfs-kernel-server # update

# RPCMOUNTDOPTS="--manage-gids"
RPCMOUNTDOPTS="--manage-gids -N 2 -N 3"
RPCNFSDOPTS="-N 2 -N 3"

/etc/default/nfs-common # add

NEED_STATD="no"
NEED_IDMAPD="yes"
sudo systemctl mask rpcbind.service
sudo systemctl mask rpcbind.socket
sudo cat /proc/fs/nfsd/versions
sudo systemctl restart nfs-server
sudo cat /proc/fs/nfsd/versions
showmount -e nas

does not work now

and all traffic goes over 2049 unencrypted with only ip address access restrictions. Very simple, very fast.

/etc/exports

/101f8f6a-e761-11eb-8e23-afa707071684    192.168.1.10(rw,sync,no_subtree_check,insecure,root_squash)

/etc/fstab

nfshost:/101f8f6a-e761-11eb-8e23-afa707071684 /opt/localnfshare nfs4  _netdev,auto  0  0