Service:
nfsd ,
rpc.nfsd ,
mountd
Protocol:
TCP/UDPPort:
2049Used for:
Sharing directories/files over a network (mostly in Unix/Linux environments)Why It’s Open
NFS allows systems to share files and directories over a network. It’s commonly used in Linux environments, especially for centralized storage or backups.
Common Risks
- Unauthenticated Access: Misconfigured exports can be mounted without credentials.
- Data Exposure: Shared directories may include sensitive files.
- Root Squashing Disabled: Allows root access from remote hosts.
- Linked to RPCbind: Often used together with port 111.
Want to save time on reporting?
Let PentestPad generate, track, and export your reports - automatically.

Enumeration & Testing
Check if open
nmap -p 2049 -sVMount
showmount -emount :/shared /mnt/testmount -t nfs :/export /mntWhat to Look For
| Checkpoint | What it means |
|---|---|
| Public exports | Anyone can mount shares |
| No root squashing | Remote root access possible |
| Weak filesystem perms | Risk of data tampering or leakage |
Known Exploits
- CVE-2015-3306 The mod_copy module in ProFTPD 1.3.5 allows remote attackers to read and write to arbitrary files via the SITE CPFR and SITE CPTO commands. 🔗 NVD Entry
Mitigation
- Use
no_root_squashonly when necessary. - Restrict exports to specific IPs or subnets.
- Mount with
read-onlywhere possible. - Avoid exposing NFS to the internet.
Real-World Example
In several ransomware attacks, NFS was used to exfiltrate and encrypt shared files once attackers had internal access to exported directories.
TL;DR
- Service: Network File System (NFS)
- Default Port: 2049
- Risks: Unauthorized file access, data leakage
- Mitigation: Restrict NFS exports, use firewalls, authenticate clients