Skip to content
Look up and open a port

Port 123: NTP port for time synchronization

Port 123 is used by the Network Time Protocol (NTP) over UDP. This tool shows you the port details and generates suitable firewall commands for your server.

Built by Justin Schuessler

Try the commands on your own VPS, with root access and your own firewall.

Add multiple ports one at a time, up to 12.

Or choose a preset

Ports

123/UDPNTP

Network services · Well-known port · OSI layer 7

Time synchronization. A server that only retrieves the time does not need an inbound rule.

IANA: officially registered as ntp

Firewall rule (inbound)

Firewall commands

Open port

sudo ufw allow 123/udp
Check port
Notes on ufw

For Ubuntu and Debian. ufw creates the rule for both IPv4 and IPv6. If ufw is disabled, allow SSH first (sudo ufw allow 22/tcp), then enable it with sudo ufw enable, or you'll lock yourself out.

On a ZAP-Hosting VPS with an active network firewall, you also need to allow the port in the Customer Panel.

Port 123 explained

What is port 123 used for?

Purpose

Computers use port 123 to synchronize their system clocks with a time server. Accurate time matters more than it may seem: TLS certificates, Kerberos, log files, cron jobs, and distributed databases all depend on systems sharing the same time. Clients such as chrony, ntpd, and systemd-timesyncd query one or more time servers and gradually correct the local clock. The time server responds to these requests on port 123.

Origin and standard

NTP was developed by David L. Mills at the University of Delaware and is one of the oldest Internet protocols still in active use. The current version, NTPv4, is described in RFC 5905. IANA has officially assigned port 123 to the “ntp” service, placing it in the well-known port range of 0 to 1023. SNTP is a simplified variant without the complex filtering algorithms and also uses port 123.

Typical use

  • Synchronizing Linux and Windows servers with public time servers
  • Internal time server used to synchronize all systems on the network
  • Essential for valid TLS certificates, Kerberos tickets and consistent log files
  • Synchronized time for clusters, database replication, and monitoring

Security

You only need inbound port 123 if your server itself acts as a public NTP server. A standard server that only synchronizes its clock is a client and needs no inbound rule: the firewall allows responses to its requests as part of the established connection. Open, misconfigured NTP servers have been widely abused for amplification attacks: using the old monlist command (CVE-2013-5211), a small spoofed request generated a very large response to the victim. If you run an NTP server, keep its software up to date, disable queries such as monlist and, ideally, allow requests only from your own networks.

More ports

Related ports

These ports are often part of the same setup. Click one to see its explanation and firewall commands.

View all well-known ports and the complete IANA list

Port list source: IANA Service Name and Transport Protocol Port Number Registry, as of October 22, 2026. iana.org

Discover more

More tools

FAQ

Frequently asked questions

Quick answers about port 123.

In practice, NTP uses UDP on port 123. Although IANA lists the port for both TCP and UDP, TCP is not used for time synchronization. A UDP rule is therefore enough for your firewall.

No, not if your server only synchronizes its own clock. Outgoing requests and their responses work without an inbound rule. You only need to open port 123 if other computers are to use your server as a time source.

Allow requests only from sources that actually need access, for example with sudo ufw allow from 203.0.113.10 to any port 123 proto udp. For an entire subnet, specify the network address with its prefix instead of a single IP. The firewall will then automatically block all other requests to port 123.

A poorly secured NTP server can amplify DDoS attacks. Attackers spoof the source address, and your server sends a much larger response to the victim. Disabling status queries, keeping software up to date and restricting access prevent this.

Any more questions?

Contact Support
Your own server?

Try the commands on your own VPS

With a ZAP-Hosting VPS, you have root access, can set up services and firewall rules yourself, and can immediately see which ports are open.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Looking for more tools? View all network tools