Port 2049 / TCP/UDP
NFS
Port 2049 – NFS Protocol Specification
Technical analysis, security advisories, vulnerability mitigation, and firewall syntax for TCP/UDP port 2049 (NFS).
Port Number
2049
Transport Protocol
TCP/UDP
Port Range Type
Registered (1024-49151)
Default Status
Restricted / LAN
Service Description & Architectural Context
Network File System for network-attached Unix storage mounts.
IANA / RFC Designation:
Port 2049 is assigned to NFS under the Internet Assigned Numbers Authority (IANA) service name registry. In enterprise infrastructure and homelab setups, services listening on this port must follow the principle of least privilege.
Security Analysis & Attack Surface Assessment
Restrict exports by IP/CIDR in /etc/exports; use NFSv4 with Kerberos (krb5p).
Hardening Recommendations:
- Do not expose port 2049 to public WAN interfaces unless authenticated TLS or VPN wrapping is strictly enforced.
- Enforce rate-limiting using Fail2ban, CrowdSec, or cloud edge DDoS protection.
- Audit active listening sockets locally:
ss -tulpn | grep :2049ornetstat -ano | findstr :2049.
Firewall Rule Snippets for Port 2049
UFW (Ubuntu / Debian Linux)
sudo ufw allow 2049/tcp
iptables (Standard Linux Kernel)
sudo iptables -A INPUT -p tcp --dport 2049 -j ACCEPT
Windows PowerShell (Defender Advanced Firewall)
New-NetFirewallRule -DisplayName "Allow Port 2049" -Direction Inbound -LocalPort 2049 -Protocol TCP -Action Allow