bitlvl
EN

Port 123 NTP · UDP

NTP: clock synchronisation. Every server should be a client of a few upstream sources; very few should be servers.

Port123
TransportUDP
ServiceNTP — Time synchronisation
CategoryInfrastructure
Rangewell-known (0–1023, needs root to bind on Unix)
EncryptedNot applicable
ExposureInternet-facing only with authentication and care

What runs on port 123

NTP: clock synchronisation. Every server should be a client of a few upstream sources; very few should be servers. Open NTP servers with monlist enabled were one of the biggest DDoS amplifiers of the 2010s, so modern daemons disable it and restrict queries by default. Wrong time breaks TLS certificate validation, Kerberos, TOTP and log correlation, which is why this port matters more than it looks.

Software that uses it: chrony · ntpd · systemd-timesyncd · Windows Time (w32time) · GPS/PTP appliances

Should port 123 be open?

Internet-facing only with authentication and care. It can be exposed when the service behind it is authenticated, rate-limited and kept up to date; most deployments are better off behind a VPN, an allow-list or a reverse proxy.

Check port 123

# on the host: is anything listening, and which process?
ss -lunp 'sport = :123'
sudo lsof -i :123

# from another machine: is it reachable?
nc -zuv host 123
sudo nmap -sU -p 123 host

A port that answers from the internet when it should not is the finding; nmap from a machine outside your network (or a VPS) is the honest test, because scans from inside the LAN pass the firewall you are trying to verify.

Allow or block port 123

# ufw (Ubuntu/Debian)
sudo ufw allow from 10.0.0.0/8 to any port 123 proto udp
sudo ufw deny 123/udp

# nftables
nft add rule inet filter input ip saddr 10.0.0.0/8 udp dport 123 accept
nft add rule inet filter input udp dport 123 drop

# iptables (legacy)
iptables -A INPUT -p udp --dport 123 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p udp --dport 123 -j DROP

# firewalld
sudo firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address=10.0.0.0/8 port port=123 protocol=udp accept'

Replace 10.0.0.0/8 with the networks that need access. Allowing by source address is the rule that matters; "allow 123" with no source is just "open".

Related ports

Part of the port number reference. Ports are 16-bit numbers; see also the subnet calculator and the packet decoder, which shows ports inside TCP and UDP headers.

Questions

Is port 123 TCP or UDP?

UDP. NTP is datagram-based; TCP 123 is not used by it.

Is port 123 encrypted?

Not applicable. The protocol carries no application data worth encrypting, or encryption is handled at another layer.

How do I check whether port 123 is open?

On the server, ss -ltnp (or -lunp for UDP) shows whether something listens on 123 and which process. From another machine, nc -zv host 123 -u or nmap -p 123 -sU host tests reachability. "Open" in a scan means something answered; a firewall usually makes the port filtered (no answer) rather than closed (RST).

Can NTP run on a different port?

Yes; the number is a convention, not a requirement. Changing it reduces log noise from scanners but does not add security, and every client, firewall rule and monitoring check then needs the new number. Keep the default unless you have a concrete reason.