0

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

2

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.

  • what is rpc.mountd used for in NFSv4 and what port does it run on? – Saurabh Nanda Feb 19 at 15:04
  • @SaurabhNanda rpc.mountd sets up the exports. It does not require a port listening for outside connections; it only communicates on the local host. – Michael Hampton Feb 19 at 15:05
  • What about idmapd ? Or can you run NFSv4 without? – HBruijn Feb 19 at 15:58
  • 1
    @HBruijn rpc.idmapd isn't required unless you're doing ID mapping. Typically this is only going to occur if the server is joined to some sort of domain (AD, FreeIPA, etc). It uses rpc_pipefs on Linux. – Michael Hampton Feb 19 at 16:05
  • @HBruijn checking-in on this again. rpc.mountd seems to be listening on port 5500 and NFS seems to be worked fine even if I don't open this port on the firewall. Is this expected? Why is rpc.mountd even listening on that port? Can one safely disable rpc.idmapd and rpc.bind via systemd the case of NFS v4? It seems that both of these are started by rpcbind.service -- can it be disabled safely? – Saurabh Nanda Mar 5 at 5:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.