The Network Time Server maintains the system time in synchronization with time servers using the Network Time Protocol to provide accurate timing for server log records and other security-sensitive functions.  NTPd is best used on systems that are permanently powered or uses broadcast or multicast IP, such as virtual or bare metal machines.


Install NTP and configure time server.

yum -y install ntp

Edit the NTP configuration file.  Disable CentOS NTP pools by remarking existing lines with # and configure to NTP server of your choice.  I've configured this to the NIST National Institute of Standards and Technology.

nano /etc/ntp.conf 

#server iburst
#server iburst
#server iburst
#server iburst
server iburst

Configure NTP server to automatically start on server reboot.

systemctl enable ntpd
systemctl start ntpd

Configure the firewall.  The time server protocol NTP uses 123/UDP.

firewall-cmd --add-service=ntp --permanent
firewall-cmd --reload


Loading Conversation