What is NTP Server Time and How Does it Work?
NTP server time is one of the oldest known services. The NTP was started and launched in year 3 by Mr. David L.Mills.
NTP server , The task of NTP servers is to synchronize the clock of clients connected to it with the accuracy of atomic clocks.
The way it works is that NTP servers are deployed on very robust, super-powerful servers around the world, and then other server clients can request the clock at any time.
Because the requested clock is requested from the exact servers, the accuracy is very high and the error coefficient is in milliseconds.
The connection to the NTP servers is via the 1 / UDP port, and sends the most accurate time zone request every time the client requests it.
Each client can connect to multiple NTP servers at a time and get the most accurate time. This is useful when installing software that requires high precision on client servers.
Factors such as the proximity of NTP servers also affect the timing of the announcement, which NTP can manage by requesting the closest server to the client to minimize the percentage of error due to the distance between the NTP and the client.
[box type = “info” align = “” class = “” width = “”] One of the NTP servers in Iran is http://time.day.ir which you can use. [/ box]
Install NTP Server Time on Linux
The NTP package is available by Centos / RHEL repository by default,
and you can install it on Linux by entering the following command.
yum install ntp
After installing NTP, go to the following site and get the list of NTP servers by selecting the continent
and country you want.
Now open the NTP config file and make the default lines of the NTP servers comment
and then enter the list you obtained from the site above.
If you want clients on your network to be allowed to sync with NTP servers, add the following code into the config file.
restrict 192.168.1.0 netmask 255.255.255.0 nomodify notrap
You can do this by referring to its log file in the logfile /var/log/ntp.log directory for the NTP service.
You now need to enable NTP server timing by the Linux firewall. To do this, follow the Linux commands I have listed below.
firewall-cmd --add-service = ntp --permanent firewall-cmd –reload
After port 3 is opened by the above commands for NTP activity,
you can now control NTP with the following commands.
systemctl start ntpd systemctl enable ntpd systemctl status ntpd
Wait a few minutes after performing the steps above to synchronize with NTP servers
and then enter the following commands to confirm and sync.
ntpq -p date –R