Keep your machine synchronized using NTP


Install the package : yum install ntp

Make a backup of the default config cp /etc/ntp.conf /etc/ntp.conf.default

Minimal and pretty safe /etc/ntp.conf : server server server server server server driftfile /var/lib/ntp/drift restrict default nopeer nomodify restrict

Make sure NTP daemon will start at boot : chkconfig ntpd on

Start the NTP service : service ntpd on

Verify if your server can reach the peers : `# ntpq -pn remote refid st t when poll reach delay offset jitter 3 u 33 64 3 31.031 -46784. 0.540 2 u 33 64 3 160.121 -46786. 0.490 2 u 31 64 3 46.861 -46782. 3.868 LOCAL(0) 10 l 30 64 3 0.000 0.000 0.001`

The port udp/123 should be opened in the router routing to the internet. Logs can be found under /var/log/messages

Thanks for reading this post!

If you found an issue in this article, you can create an issue on Github.

If you have a comment or question, please drop me a line below!