Port 111: ONC RPC portmapper

Port 111 (TCP/UDP) is used by ONC RPC portmapper. Maps RPC programs to ports, needed by NFS v3 and older. Should not face the internet.

111Port
TCP/UDPProtocol
sunrpcIANA service name
File transferCategory

Port range

111 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Port 111 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 111 in a firewall

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

Check if port 111 is open

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

Other file transfer ports

Frequently asked questions

What is port 111 used for?
ONC RPC portmapper. Maps RPC programs to ports, needed by NFS v3 and older. Should not face the internet.
Is port 111 TCP or UDP?
Both are assigned. Check which one your software actually listens on.