NTP Server Install and Configure
Vysakh Nair- 12 Jul, 2019

NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to time reference. The NTP client initiates a time-request exchange with the NTP server. As a result of this exchange, the client can calculate the link delay and its local offset and adjust its local clock to match the clock on the server’s computer. As a rule, six exchanges over a period of about five to 10 minutes are required to initially set the clock. Once synchronized, the client updates the clock about once every 10 minutes, usually requiring only a single message exchange. In addition to client-server synchronization. This transaction occurs via the User Datagram Protocol on port 123. NTP also supports broadcast synchronization of peer computer clocks. This blog covers installation and configuration of NTP Server on Cent OS and how to configure NTP Client in Domain Controller and Linux Servers.
Install & Configure NTP Daemon
Download and Install NTP server RPM from default CentOS repository by issuing the following command

After the server is installed, go to official NTP Public Pool Time Servers website and choose your Continent area where the server physically is located, then search for your Country location and you will get a list of NTP servers.

Then open NTP daemon main configuration file (/etc/ntp.conf) for editing, comment the default list of Public Servers from pool.ntp.org project and replace it with the list provided for your country like below.

Start the services and add the service to startup as below

NTP service uses UDP port 123 on OSI transport layer (layer 4), For security enable firewall and allow only NTP traffic towards NTP server

If you need additional information for troubleshooting in case there are problems with your NTP daemon add a log file statement which will record all NTP server issues into one dedicated log file. ntpq command will help you to know the status of ntp

NTP Client Configuration in Windows Domain Controller
We can configure time server on a windows domain controller by using GPO with WMI filter and W32tm.exe, I am explaining with W32tm Run the following command on the PDC emulator:
w32tm /config /manualpeerlist:timeserver /syncfromflags:manual /reliable:yes /update
Run the following command on all other DCs (that are not PDC):
w32tm /config /syncfromflags:domhier /updateOnce done, restart W32Time service.

To check the source time server, run the following command
w32tm /query /statusNTP Client Configuration in Linux Server
To configure ntp in client machine install ntpd daemon like we installed on NTP server and configure the server as NTP server which we created and restart the services like below

Thanks, 😊
If you have any comments, please drop me a line