What is port 123 used for?
Network Time Protocol: keeps clocks in sync.
Should port 123 be open?
Open only if you need it. Expose it only when required, with encryption and strong authentication, ideally limited to known IP addresses. Misconfigured NTP servers have been abused for DDoS amplification, so only answer queries you intend to.
See what is listening on port 123
# Linux
sudo ss -ulnp | grep ':123 '
# macOS
sudo lsof -nP -i UDP:123
# Windows (PowerShell)
Get-NetUDPEndpoint -LocalPort 123
Open or block port 123 in a firewall
# Ubuntu / Debian (ufw)
sudo ufw allow 123/udp
sudo ufw deny 123/udp
# Windows (PowerShell, as administrator)
New-NetFirewallRule -DisplayName "Port 123" -Direction Inbound -Protocol UDP -LocalPort 123 -Action Allow
On cloud servers, also open the port in the provider’s security group or network firewall. At home, a service behind a router needs a port-forwarding rule to the device’s local IP.