CyberHunter
Local dataset, no network
// File transfer & sharing

Port 2049: NFS

Network File System shares.

Network File System
2049

How NFS works

File transfer & sharing
client:20491/32/33/3/export/home client:20491/32/33/3/export/home

Files are sent over port 2049 in pieces and reassembled on the other side. It travels in clear text: anyone on the path can read it, passwords included.

Transport
TCP · UDP · SCTP
Exposure risk
7/10 high if reachable from the Internet
Encryption
Clear textreadable on the network
IANA status
Assigned2 registered services
Range
Registered (1024-49151)
01 Security

Is port 2049 dangerous?

Common attacks and weaknesses

  • Exports open to any host, no_root_squash giving root access to files.

How to secure it

  • Restrict exports to specific hosts, keep root_squash, use Kerberos (sec=krb5p).
02 Registry

IANA registry entries for port 2049

ServicePortTransportDescriptionReferenceUpdated
nfs 2049 TCP, UDP, SCTP Network File System - Sun Microsystems - -
shilp 2049 TCP, UDP - -

// source: IANA service name and port number registry

03 Check it

Which program uses port 2049, and is it reachable?

Linux

sudo ss -ltnup 'sport = :2049'      # process listening on 2049
sudo lsof -nP -i :2049

macOS

sudo lsof -nP -i :2049

Windows (PowerShell)

Get-NetTCPConnection -LocalPort 2049 -State Listen | Select LocalAddress, OwningProcess
Get-NetUDPEndpoint -LocalPort 2049
netstat -ano | findstr :2049

From another machine

nmap -p 2049 -sV <host>
sudo nmap -sU -p 2049 <host>
nc -zv <host> 2049

Block it in the firewall

sudo ufw deny 2049/tcp                                         # Linux (ufw)
New-NetFirewallRule -DisplayName "Block 2049" -Direction Inbound -LocalPort 2049 -Protocol TCP -Action Block  # Windows
04 FAQ
What is port 2049 used for?

Network File System shares.

Is port 2049 TCP or UDP?

Port 2049 is registered for TCP and UDP and SCTP. In practice the service mostly uses TCP and UDP.

Is it safe to open port 2049?

It is rated 7/10 (high) when exposed to the Internet. Exports open to any host, no_root_squash giving root access to files. Restrict exports to specific hosts, keep root_squash, use Kerberos (sec=krb5p).

How do I check if port 2049 is open?

On Linux run "ss -ltnup 'sport = :2049'", on macOS "lsof -nP -i :2049", and on Windows "netstat -ano | findstr :2049" to see the local process. From another machine, "nmap -p 2049 <host>" shows whether it is reachable.

05 Related

Latest vulnerability news

All news