Port 123: NTP

Port 123 (UDP) is used by NTP. Network Time Protocol keeps clocks in sync. Public servers must restrict monlist queries to avoid amplification.

123Port
UDPProtocol
ntpIANA service name
Network infrastructureCategory

Port range

123 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

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

Open port 123 in a firewall

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

Check if port 123 is open

nc -vzu example.com 123   # UDP checks are unreliable: no reply ≠ closed
sudo ss -tulpn | grep ':123 '   # what is listening locally (Linux)

Other network infrastructure ports

Frequently asked questions

What is port 123 used for?
NTP. Network Time Protocol keeps clocks in sync. Public servers must restrict monlist queries to avoid amplification.
Is port 123 TCP or UDP?
UDP.