Hot answers tagged

37 votes

Force systemd timesyncd to sync time with NTP server immediately

Without installing any more packages... Turn NTP off, manually set the time to be close enough, turn NTP back on: Set NTP Service inactive $ timedatectl set-ntp false Set the time manually Get the ...
  • 2,458
30 votes
Accepted

What is NTP dispersion and how do I control it?

I see some confusion going on in the answers here. For starters, ntpclient, at least in -s mode, isn't acting as a full NTP client, it's only sending and receiving one packet, so there's no "last 8 ...
  • 528
25 votes
Accepted

NTP Service Auto-Discovery

You can specify an NTP server via DHCP, or Group Policy, or DNS SRV records. DHCP: GPO: SRV Record: If your client is unable to leverage any of those mechanisms... you can also pretty safely ...
  • 55.3k
24 votes
Accepted

Risk of starting NTP on database server?

Databases don't like backward steps in time, so you don't want to start with the default behavior of jumping the time. Adding the -x option to the command line will slew the time if the offset is ...
  • 27.6k
24 votes
Accepted

Force systemd timesyncd to sync time with NTP server immediately

To use an actual NTP implementation, you need to install and configure one, chrony or maybe ntpd. Do so if you require any monitoring of time performance. I will assume chrony. Add iburst to your pool ...
23 votes
Accepted

Things to consider when running public NTP servers

Firstly, good for you; it's a helpful and public-spirited thing to do. That said, and given your clarification that you're planning on creating one or more DMZ VMs which will sync to and make ...
  • 79.2k
21 votes

Dealing with NTP reflection attacks in IPTables

Essentially, you're outta luck if the DDoS attack manages to fill whatever pipe you have to the Internet (which is the purpose of any UDP reflection attack -- to fill the pipe). If your upstream link ...
  • 95.8k
20 votes
Accepted

How to synchronize time on ESXi Windows virtual machines within one second?

This is 2018. Windows is capable of keeping servers synchronized within 2 ms or so, as required by MIFID II Regulations. So, your problem is a non-problem. Our sysadmins using windows NTP to sync ...
  • 51.4k
15 votes
Accepted

Time synchronization in an heterogeneous environment

[EDIT] A major rewrite with references as I just jotted down the old answer from memory. Short answer: no. It is not possible to get near-millisecond accuracy from a run-of-the-mill operating system ...
  • 4,726
15 votes
Accepted

How to set up local ntp server without internet access on ubuntu?

Don't do this. Seriously. Just don't. People keep coming up with the idea that NTP is designed to allow a bunch of machines all to have the same time. It isn't. It's designed, quite carefully, to ...
  • 79.2k
13 votes

What is NTP dispersion and how do I control it?

Just a partial answer for "What is dispersion?": A typical NTP round trip: client | | server t1 |------->| t2 t3 |<-------| t4 This yields two values, offset (the time ...
  • 98.1k
12 votes
Accepted

What happens when DC cannot reach external time server?

The domain controller is a always using the hardware clock. The W32time client is just making periodic corrections to it. (Note that "hardware" becomes a nebulous term when talking about a ...
  • 2,583
12 votes

How do I point clients to the NTP server?

It's actually more important, in terms of the domain continuing to work properly, that your clients and member servers use Domain Controllers for their time source than it is that your clients have ...
  • 31.8k
12 votes

Things to consider when running public NTP servers

Firstly, congrats on an NTP question that is non-facepalm material. :-) I've included some graphs at the bottom of this post to give you a feel for things. The VM in question is set to 100 Mbps in ...
  • 4,032
12 votes

Sync ntp immediately at boot with undiciplined clock

You can use the -g parameter. From the manpage: -g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the ...
  • 436
11 votes
Accepted

NTP: How to establish redundant solution for NTP servers?

I suspect this is a non-problem: NTP is resilient to this already. You don't have a "primary" NTP server, and some secondaries: you have a set of configured servers. NTPd will decide which is ...
  • 79.2k
11 votes
Accepted

Getting NTP to work on AWS without opening inbound port in security group

According to the AWS Documentation you can open UDP:123 in your security group outbound only. Because security groups are stateful replies will get back to you, but no-one outside your VPC will be ...
  • 31.2k
10 votes

ntp.conf pool vs server directives

The answer was given by mboehn. To clarify more: See the document he mentioned. Especially the last lines: The pool scheme is configured using one or more pool commands with DNS names indicating ...
  • 101
10 votes
Accepted

How can I synchronize system time with a NTP server continuously?

No. It is good practice to run ntpd, because that is what it is for - to continuously keep your time as precisely sync'ed to correct time as possible, with the assistance of one or more reference ...
  • 79.2k
10 votes
Accepted

ntpd synchronizes but chronyd fails

The difference is that chronyd by default uses a random source port for each client request. If the firewall doesn't allow client requests from other ports than 123, you will need to specify the port ...
  • 116
9 votes

Risk of starting NTP on database server?

Databases can be especially vulnerable to system time changes if they are very active and have timestamps on internal records. In general, if you're time is behind, you'll have much fewer problems if ...
  • 9,010
9 votes
Accepted

ntp.conf pool vs server directives

As far as I can see in the sources, ntpd handles both a member of a pool and individual servers roughly in the same way: it adds them to the list of peers. All these peers are used by ntpd. The ...
9 votes
Accepted

Best choice for NTP client configuration

I feel quite strongly that two local servers, which everyone else binds to, is the right way to go. NTP is designed to work that way, and it minimises the load on the public/pool servers. I run an ...
  • 79.2k
9 votes

Chrony time synchronization on huge time diff

If your time is way off (days or even months), time synchronization will not work ("it will take a long time") because NTP clients like Chrony adjust the clock gradually by slowing it down or ...
  • 353
9 votes
Accepted

NTP server architecture

Depending on how critical time keeping is in your environment, you may not want server1 to be a single point of failure. If you have to take it offline for maintenance or repair for an extended period ...
  • 12.5k
9 votes

Ntpd on local network - Preventing clock drift causing high offsets

A driftfile records the frequency of the local clock, and is a good thing to have to accurately discipline it. Ubuntu /etc/ntp.conf has a driftfile by default. Appending iburst to the server line ...
8 votes

Is there research material on NTP accuracy available?

Vested interest on my part: I'm a Meinberg agent :-) Yes NTP can achieve an end-to-end precision down to approx. 50 us (that's microseconds) of jitter, if you sync a linux "client" on bare ...
  • 261
8 votes

DST Morocco, a way to trick NTP server

The problem with tricking the computers is that, while the clock will appear correct, the actual times stored in the system will be one hour wrong. Eventually you will get a timezone update for your ...
8 votes
Accepted

ntpd: servers stuck on .INIT

Your firewall rules do not permit NTP. The line 0 0 ACCEPT tcp -- br1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:123 is all very well, but NTP is a UDP service. Change ...
  • 79.2k
8 votes
Accepted

Allow Active Directory users to disable datetime sync

As pointed out by @MDMarra, using a VM is a great way to go because blocking time synchronization can cause significant problems for authentication, TLS certificate validity, etc. However, for true ...
  • 3,369

Only top scored, non community-wiki answers of a minimum length are eligible