How can you query the time of the nearest ntp.org NTP server under Debian?
1
vote
2
answers
67
views
It is well known that by configuring the file /etc/systemd/timesyncd.conf accordingly, you can query NTP servers from a specific country using the following entries, for example:
NTP=0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org
FallbackNTP=0.at.pool.ntp.org 1.at.pool.ntp.org 2.at.pool.ntp.org 3.at.pool.ntp.org
It is also known that the query can be configured for specific regions such as:
europe, north-america, oceania, and asia.pool.ntp.org
However, how can the query be configured so that the NTP server closest to your own location is always queried?
According to some sources, the following query returns a response from any NTP server and not the one closest to your location:
server pool.ntp.org
The following configuration may have something to do with a possible solution. However, I have not found any reliable sources on this:
# Dynamic Configuration
server pool.ntp.org dynamic iburst
# Static Configuration
server 0.de.pool.ntp.org iburst prefer
server 1.de.pool.ntp.org iburst
server 2.de.pool.ntp.org iburst
Remark:
It is well known that if you were to use an unencrypted NTP server from Cloudflare (pls. wait) instead of an unencrypted ntp.org NTP server, you would automatically always use the nearest of the 330+ Cloudflare NTP servers, regardless of your own location.
It is also well known that it is unsafe to use unencrypted NTP servers and that there is a modern encrypted successor such as NTS, and that when using one such server, such as (please wait), regardless of your own location, you would automatically always use the nearest of the 330+ Cloudflare NTP servers.
However, the question refers to the unencrypted service offered by ntp.org, as there are still router firmwares that only allow you to specify NTP servers and not NTS servers, and it can't hurt to know more than one provider and the corresponding configuration, so that you can always automatically use the nearest NTP server regardless of your location.
Asked by Alfred.37
(137 rep)
Aug 9, 2025, 09:41 PM
Last activity: Aug 11, 2025, 10:17 AM
Last activity: Aug 11, 2025, 10:17 AM