What are the required ports (Inbound and Outbound) that need to be opened in AWS while configuring NFS? While mounting, I'm getting the timeout error. I'm using Ubuntu 16 as server and client.

1 Answer 1


NFS uses differents port according if it's running NFSv3 or v4 (which uses tcp as default protocol for connection). If you have NFSv3 running, by default you have to open 4 ports. The ports used for NFS are assigned dynamically by rpcbind, which can cause problems when creating firewall rules. To simplify this process, use the /etc/sysconfig/nfs file to specify which ports are to be used:

MOUNTD_PORT — TCP and UDP port for mountd (rpc.mountd)

STATD_PORT — TCP and UDP port for status (rpc.statd)

LOCKD_TCPPORT — TCP port for nlockmgr (rpc.lockd)

LOCKD_UDPPORT — UDP port nlockmgr (rpc.lockd)

sometimes rpc.mountd port is the same as the port described in /etc/services under mountd (in RHEL7 it is 20048/tcp and udp) A util command to know which ports are being used is run on the server rpcinfo -p

  • It's nfsv4. When I enable (open) all outbound ports of NFS server from AWS panel it will work properly. But I don't want to open all outbound ports.
    – shibin
    Jun 21, 2016 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .