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
You decide which services we may enable for analytics, personalization, and external content.
We use cookies and similar technologies on our website to personalize content, embed external media, and better understand how individual areas are used.
Necessary cookies
These entries support essential functions such as security, stability, and form processing.
Optional sections
Your data may be processed with your consent or on the basis of legitimate interests. In the cookie settings, you can reject or explicitly allow each optional category.
Some services process personal data in third countries. By consenting, you also agree to this transfer. You can find more information in our Privacy Policy.
You can reopen and change your selection at any time. · 1.0.2
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.
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 commands
Open port
sudo ufw allow 123/udpFor 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
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.
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.
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
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
Calculate the network address, broadcast address, subnet mask, and usable host range from a CIDR address, and convert between CIDR and IP ranges (IPv4 and IPv6).
Built by Jakub Martyniak
Interactively learn the 7 layers of the OSI model: click layers, assign terms such as switch, ARP, or port 443, and explore animated encapsulation, a quiz, and a cheat sheet for the IHK exam.
Built by Justin Schuessler
Interactively learn the 4 layers of the TCP/IP model (DoD model) according to RFC 1122, with OSI model mapping, animated encapsulation, a port quiz, and a cheat sheet.
Built by Justin Schuessler
Check whether specific ports are open on an IP or hostname—select a protocol or game instead of scanning all ports at once.
Built by Sebastian Rademacher
FAQ
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 SupportWith a ZAP-Hosting VPS, you have root access, can set up services and firewall rules yourself, and can immediately see which ports are open.
No setup. No risk. Online in seconds.
Looking for more tools? View all network tools