Enabling an NTP server

Maybe the network you're managing is very restricted, and it takes ages to get network changes done. In this case, you might have a pool of servers that are designated as NTP providers for the rest of your estate.

In this case, you will need to configure chronyd to allow connections from other clients. We'll use centos2 for the server.

On centos2, add a line to the bottom of our chrony.conf file to allow access from our eth1 network (192.168.33.0):

$ sudo tee --append /etc/chrony.conf << HERE
allow 192.168.33.0/24
HERE

Restart chronyd with the new changes:

$ sudo systemctl restart chronyd

Now, on the system that's to be the client, centos1, perform the following steps.

First, modify our chrony.conf file by commenting out the existing server lines:

$ sudo sed -i 's/server/#server/g' /etc/chrony.conf 

Next, add the required configuration directives for pointing to centos2:

$ sudo tee --append /etc/chrony.conf << HERE
server 192.168.33.11 iburst
allow 192.168.33.11
HERE

Restart chronyd on centos1:

$ sudo systemctl restart chronyd

You now have a server configured, and a client connected to it.