What services and ports are required for NFSv4?

Saurabh Nanda asked:

I’ve been trying to find the definitive answer to this question, but I’m getting conflicting results due to various NFS versions out there.

I’ve configured NFSv4 by following https://help.ubuntu.com/community/NFSv4Howto and currently have the following services running on my machine:

  • rpc.mountd
  • rpcbind
  • nfsd
  • lockd

Which of these are required to run an NFS server in v4 only? How do I disable the rest? Consequently, which ports should I open on my firewall?

PS: I’m on Ubuntu 18.04

My answer:

Only rpc.mountd and nfsd are required to be running for NFSv4.

NFSv4 runs on TCP port 2049. The NFS server must accept incoming connections on this port. Unlike previous versions of NFS, this is the only port that is required.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.