Is port 123 (NTP) exposed to the internet?
Port 123/UDP runs NTP, the protocol computers use to sync clocks, and an NTP server that answers anyone can be abused to flood a third party with amplified replies; AdminKit's open ports check scans a fixed set of TCP ports today, so confirming UDP/123 exposure still takes one manual command run from outside your own network.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- NTP uses UDP port 123. Almost every router, camera and server runs an NTP client, but only some also answer time queries from other hosts, and that is the part that matters for exposure.
- The risk of an open NTP server is not that someone learns your time. It is amplification: spoofed queries make your server send larger replies to a third party.
- The worst offenders are the monitoring and control queries (ntpd’s mode 7
monlistand mode 6 control messages). RFC 8633 recommends that public-facing servers block control queries from outside the organisation. - AdminKit’s open ports check tests TCP ports only, so check UDP/123 by hand from outside your network, then close it or restrict it with
restrict ... noquery(ntpd) or by not usingallow(chrony).
What is listening on port 123?
NTP (RFC 5905) keeps a device’s clock in sync with a reference time source, and IANA assigns UDP port 123 to it. Routers, NAS boxes, cameras and plenty of general-purpose servers run an NTP daemon so their own logs and certificates have an accurate clock — and depending on configuration, that same daemon can also answer time queries from anyone who can reach it, not just the device’s own clients.
Which NTP messages actually matter for exposure?
Not every packet sent to port 123 is equal. NTP packets carry a three-bit “mode” field, and RFC 5905 section 3 defines what each value means. The modes that matter when you are judging an internet-facing device are these:
| Mode | Meaning | Who sends it | Exposure concern |
|---|---|---|---|
| 3 | Client request | Any host asking for the time | A server that answers mode 3 from anyone is a public time server, whether you meant it to be or not. |
| 4 | Server reply | The time server | Roughly the same size as the request, so ordinary replies give little amplification on their own. |
| 1 / 2 | Symmetric active / passive | Peers that sync with each other | RFC 8633 section 5.6 advises symmetric mode only with trusted peers. |
| 6 | Control message (ntpq) | Monitoring tools | Replies are much larger than queries; RFC 8633 section 3.4 recommends blocking them from outside your organisation. |
| 7 | Private, ntpd-specific (ntpdc, monlist) | Old ntpd monitoring | The source of the CVE-2013-5211 amplification attacks. |
Mode 6 messages were defined in an appendix of the older NTPv3 specification and were never part of NTPv4 itself, but RFC 8633, the NTP best-current-practice document, notes that they “are still used” and that “the NTP control message responses are much larger than the corresponding queries.” That is the whole problem in one sentence: a small question produces a large answer, and UDP lets the asker lie about where the answer should go.
Why an open NTP port is a risk, not just noise
An exposed NTP server’s main risk isn’t someone reading your clock — it’s amplification. An attacker sends a small UDP query with the victim’s IP address spoofed as the source; the server’s reply goes to the spoofed address instead of the real sender, and certain NTP query types historically returned a reply many times larger than the request, turning a handful of small packets into a flood aimed at someone else entirely. Current ntpd releases disable the specific monitoring command most responsible for the largest amplification factor by default, but an old or unpatched install can still have it enabled, and even an ordinary time query response contributes some amplification on a server configured to answer the whole internet rather than a defined set of peers. That command is monlist, and the CISA/US-CERT advisory on CVE-2013-5211 documented amplification factors far larger than the request size from this single command, which is why it’s disabled by default in later ntpd releases rather than left for operators to turn off themselves.
Why does an IoT device answer NTP at all?
Most devices only need to be NTP clients. A camera or a smart thermostat sends a mode 3 request out to a time source, gets a mode 4 reply, and sets its clock. That traffic is outbound, and a stateful firewall or home router lets the reply back in without opening port 123 to the world.
Exposure happens when a device also runs a server. Some routers act as the local time source for the LAN and bind the NTP daemon to every interface, including the WAN side. Some embedded Linux images ship a full ntpd with a permissive default configuration. And some industrial or building controllers serve time to the devices around them, which is a reasonable job on a plant network and a poor one on a public address. RFC 8633 section 6 calls out embedded devices specifically: they “will be subject to the same security threats as traditional deployments,” and because owners usually cannot update the NTP software on their own, a fix depends on the vendor shipping firmware.
How do I check whether port 123 is exposed?
AdminKit’s open ports check only probes a fixed list of TCP ports — UDP services like NTP on 123 aren’t covered, so confirm this one manually. From a machine outside your network (testing from inside will give you the wrong answer), check your own public IP (see My IP for your current address):
nc -u -vz -w 3 203.0.113.5 123
UDP has no handshake, so a lack of response doesn’t always mean the port is closed — for a clearer signal, query it as an actual NTP client from outside your network, for example ntpdate -q 203.0.113.5 or ntpq -c rv 203.0.113.5, and see whether it returns a real time/status reply.
Reading the result
Run the queries from a host outside your network, against your own address only. The answers fall into a few patterns:
| What you see | What it means | What to do |
|---|---|---|
ntpdate -q prints a server line with a stratum and an offset | The host answers ordinary time requests from the internet | Decide whether it should be a public time server. If not, close the port. |
ntpq -c rv prints system variables (version, stratum, refid) | Mode 6 control queries are answered from outside | Block control queries now; this is the case RFC 8633 warns about. |
ntpq -c rv times out but ntpdate -q answers | Time service is open, control queries are refused | Lower risk, but still restrict who can query if you do not run a public service. |
Both time out, nc -u reports nothing | Nothing answered within the timeout | Likely closed or filtered. UDP gives no handshake, so repeat once before concluding. |
A reply to ntpq is the result to act on first. It tells you the daemon is willing to send large monitoring answers to anyone, which is exactly the traffic an amplification attack needs.
An exchange against a host that is exposing control queries looks like this (illustrative output, trimmed; addresses from the documentation ranges):
$ ntpq -c rv 203.0.113.5
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.8p15@1.3728-o", processor="armv7l",
system="Linux/5.10.0", leap=00, stratum=3, precision=-20,
refid=192.0.2.10, ...
Besides confirming exposure, that reply leaks the software version and platform, which RFC 8633 section 5.1 lists as information an operator should avoid giving away.
How to fix it
If your device doesn’t need to serve time to other networks, don’t expose NTP to the internet at all — most home routers and IoT devices only need to query outbound to a time source, never accept inbound queries. If you deliberately run an NTP server for others, restrict which clients it answers using your NTP software’s access controls (ntpd’s restrict directive, or the equivalent in chrony), keep the software patched, and disable any legacy monitoring/query commands your version still ships with. Open resolvers are the DNS equivalent of this same misconfiguration — see is your DNS resolver an open resolver for how the same spoofed-source amplification pattern plays out there.
Example configurations
For ntpd, RFC 8633 appendix A.2 gives the default-deny line itself. A client-only device that still needs to talk to its own upstream servers and to local tools can use:
# /etc/ntp.conf — answer nobody by default, allow local queries
restrict default -4 nomodify notrap nopeer noquery
restrict default -6 nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
pool pool.ntp.org iburst
noquery refuses mode 6 and mode 7 queries, which closes the large-reply path; the ntpd access control documentation puts it as “Deny ntpq and ntpdc queries. Time service is not affected.”; nomodify blocks run-time configuration changes; nopeer stops unknown hosts from setting up symmetric associations. If the server should answer time requests for one internal range, add a narrower restrict line for that range rather than loosening the default.
chrony starts from the safer position. Its documentation states that “the default is that no clients are allowed access, i.e. chronyd operates purely as an NTP client.” It only serves time when you add an allow directive, so scope that directive to the networks you mean:
# /etc/chrony/chrony.conf — serve the LAN only, rate-limit clients
pool pool.ntp.org iburst
allow 192.168.10.0/24
ratelimit interval 3 burst 8
Leave allow out completely on any device that does not need to serve time. Whichever daemon you use, add a firewall rule that drops inbound UDP/123 on the WAN interface; the configuration and the firewall should each be enough on their own, so one mistake does not reopen the port.
Finally, the spoofing that makes amplification possible is stopped at the network edge, not on your server. RFC 8633 section 2.1 points to BCP 38 ingress filtering: networks that drop packets with forged source addresses take away the attacker’s ability to aim replies at a victim. That is a job for your ISP or upstream provider, but it is worth asking about if you run your own edge router.
Other exposure checks worth running
If you’re reviewing exposure more broadly: is your DNS resolver an open resolver covers the DNS side of the same amplification risk, how to publish and test MTA-STS covers mail transport security, and how to find a dangling CNAME covers a different, DNS-hygiene kind of exposure. NTP isn’t the only UDP service with this profile — is port 161 (SNMP) exposed walks through the same spoofed-source amplification pattern on a different, equally common management protocol. All four sit in AdminKit’s machine protocols and DNS clusters alongside the live tools and glossary terms that back them.
Defensive use only
Every check this page describes is for assets you own or are explicitly authorized to test. Never query, probe, or attempt to connect to a network or device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
What is port 123 actually for?
Port 123/UDP is the IANA-registered port for NTP (Network Time Protocol), which synchronizes a device's clock against a time server. Routers, servers, cameras and other embedded devices frequently run an NTP daemon so their own clock stays accurate, and many also answer time queries for other devices on the network.
Does AdminKit's open ports check cover port 123?
No. AdminKit's open ports check (/tools/port-check/) scans a fixed list of nine commonly-exposed TCP ports on your own public IP — Telnet (23), RTSP (554), MQTT (1883/8883), Modbus (502), TR-069 (7547) and admin web UIs (80/443/8080) — but NTP runs over UDP on 123, which isn't on that list, so this check doesn't surface it.
How do I check UDP/123 exposure manually?
From a machine outside your network, run `nc -u -vz -w 3 203.0.113.5 123` against your own public IP (the My IP tool shows your current address). A UDP response or no ICMP port-unreachable error within the timeout suggests something is listening; UDP's connectionless design means this is less definitive than a TCP check, so a dedicated NTP query tool (`ntpdate -q` or `ntpq -c rv`, run against your own address from outside) gives a more reliable answer.
What's the actual risk if NTP is open to the world?
The main risk is NTP amplification: an attacker sends a small, spoofed-source NTP query to an open server, and the server's reply — which can be many times larger than the request — floods whichever address was spoofed as the source, not the attacker. Older ntpd versions with monitoring queries enabled made this worse by returning very large replies to a single small request; current ntpd releases disable that behavior by default, but a server running old, unpatched software can still be exposed.
Sources
- Access Control Commands and Options — NTP Documentation (ntp.org)
- RFC 5905 — Network Time Protocol Version 4: Protocol and Algorithms Specification
- IANA Service Name and Transport Protocol Port Number Registry
- CISA/US-CERT — Alert: NTP Amplification Attacks Using CVE-2013-5211 (monlist)
- RFC 8633 — Network Time Protocol Best Current Practices (BCP 223)
- chrony — chrony.conf documentation (allow, ratelimit, cmdport)
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.