Port 2049 is the NFS (Network File System) port for mounting remote filesystems over a network. NFSv4 uses TCP port 2049 exclusively. NFSv3 uses both TCP and UDP 2049 plus additional ports via portmapper (111). NFS traffic should be restricted to trusted internal networks – NFS has no built-in encryption and older versions have weak authentication.
Port Number
2049
Protocol
TCP/UDP
Service
Network File System
Range
IANA Well-Known (0–1023)
List NFS exports from a server (if this works remotely, the server is too open)
showmount -e server_ipCheck NFS export configuration on the server
cat /etc/exportsNFS server statistics – check for errors and rejected operations
nfsstat -sMount with NFSv4 + Kerberos encryption (most secure option)
mount -t nfs4 -o sec=krb5p server:/share /mntmount -t nfs4 server:/export /mnt/nfs
showmount -e server
nfsstat -mNFS was created by Sun Microsystems in 1984 as part of their ONC RPC framework. NFSv2 (1989) and NFSv3 (1995) required multiple ports (portmapper, mountd, lockd). NFSv4 (2003, RFC 3530) consolidated everything onto TCP 2049 and added stateful operations. NFSv4.1 (2010) added pNFS for parallel data access. NFSv4.2 (2016) added server-side copy and space reservations. AWS EFS (2016) provides managed NFSv4.1.
NFSv3 vs NFSv4 – which should I use?
NFSv4 in all new deployments. Advantages: single port (2049 TCP only, no portmapper), native Kerberos support (sec=krb5p for encryption), stateful protocol (better lock handling), built-in ACL support, firewall-friendly. NFSv3 still needed for: legacy clients, UDP requirement (rare), or when Kerberos infrastructure doesn't exist.
What does root_squash vs no_root_squash mean?
root_squash (default, KEEP IT): maps remote root (uid 0) to nobody/nfsnobody on the server – a compromised client's root cannot modify server files as root. no_root_squash: remote root = server root. Only use no_root_squash when the client MUST write root-owned files (e.g., diskless boot images, container runtime storage) AND the client network is fully trusted.