NFS

From Lolly's Wiki
Jump to navigationJump to search

Some things to know about NFS...

NFSv4.1

Server

Configure rpc.idmapd

  • /etc/idmapd.conf

You should better set a Domain. Set the same Domain on server an client(s)!

[General]
...

# set your own domain here, if it differs from FQDN minus hostname.
# you can use a fantasy name, but whatever it is, keep this identical on server and client!
Domain = myfantasy.domain

...

Bind rpc.mountd to specific port

The port of the rpc.mountd is usually random this is a nightmare for firewallers so picking a known port is much better.

  • /etc/default/nfs-kernel-server
RPCMOUNTDOPTS="--manage-gids --port 33333"

Configure ufw

Caution! The port you set above for the mountd has to be the same here! I used 33333, if you changed it above for some reason: Change it here, too!

  • /etc/ufw/applications.d/nfs
[NFS-Server]
title=NFS-Server
description=NFS Server
ports=111/tcp|111/udp|2049/tcp|33333/tcp
# ufw allow from 172.16.16.16/28 to any app "NFS-Server"