Ports / NTP

UDP port

Port 123: NTP

UDP port 123 is NTP: a machine asks time servers what time it is and steers its own clock to match.

  • Servers form a hierarchy of strata, from a reference clock down.
  • A certificate is only valid between two dates, so a machine with a wrong clock refuses good certificates.

Check port 123 on Linux

Put the server's name or address in place of HOST.

ss -ulnp 'sport = :123'
On the server: is a program listening on UDP port 123, and which? How to read ss.
tcpdump -ni any udp port 123
On either end: the datagrams to and from UDP port 123. With UDP this is the sure test, since nothing is acknowledged. How to read tcpdump.
nmap -sU -p 123 HOST
From outside: a UDP scan of port 123. No answer reads open|filtered: UDP does not say which. How to read nmap.

What runs on it

NTP
Keeping clocks right by asking other clocks, in a hierarchy of strata from a reference clock down.
NTS
Authenticating an NTP server over TLS so a spoofed or man-in-the-middle time source is refused.

Use port 123 on real machines

Open NTP: keep every clock on the network honest

When it breaks

Sources

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab