Port 2049: NFS

Port 2049 (TCP/UDP) is used by NFS. Network File System for Unix/Linux shares.

2049Port
TCP/UDPProtocol
nfsIANA service name
File transferCategory

Port range

2049 is a registered port (range 1024–49151). Any user can bind to it; IANA records which service registered the number.

Security

Only open port 2049 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 2049 in a firewall

ufw         sudo ufw allow 2049/tcp
            sudo ufw allow 2049/udp
iptables    sudo iptables -A INPUT -p tcp --dport 2049 -j ACCEPT
            sudo iptables -A INPUT -p udp --dport 2049 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=2049/tcp
            sudo firewall-cmd --permanent --add-port=2049/udp
Windows     New-NetFirewallRule -DisplayName "NFS 2049" -Direction Inbound -Protocol TCP -LocalPort 2049 -Action Allow

Check if port 2049 is open

nc -vz example.com 2049
Test-NetConnection example.com -Port 2049   # PowerShell
sudo ss -tulpn | grep ':2049 '   # what is listening locally (Linux)

Other file transfer ports

Frequently asked questions

What is port 2049 used for?
NFS. Network File System for Unix/Linux shares.
Is port 2049 TCP or UDP?
Both are assigned. Check which one your software actually listens on.