Using NTP to build your own NTP service was published on September 22, 2013 by the author Admin
For Campus Network/enterprise users, if all your computers in the network synchronize time over the Internet, there will be a certain discount on speed and accuracy, and there will also be a certain impact on Internet egress bandwidth, for such users, we recommend that you set up your own NTP service to provide internal users with time synchronization services.
Setting up the NTP service in a Linux system is very simple. Even if you are not familiar with Linux, just a few simple operations are enough. The following are the necessary steps:
1. Install the familiar Operating System (assume that you have installed centos 6 ).
2. Check whether the NTP program has been installed and run the following command on the terminal:
# rpm -qa | grep ntpntp-4.2.4p8-2.el6.centos.x86_64ntpdate-4.2.4p8-2.el6.centos.x86_64
If you see these two software packages, the NTP program has been installed. Otherwise, run the following command to install
yum install ntp
3. Modify the/etc/NTP. conf file and add the following server address:
server ntp.neu.edu.cn maxpoll 6server time.hko.hk maxpoll 6server 133.243.238.163 maxpoll 6server 193.190.230.65 maxpoll 6server 220.231.55.106 maxpoll 6server 210.72.145.44 maxpoll 6server ntp.openxid.com maxpoll 6server ntp.zyhyt.org maxpoll 6server time.tju.edu.cn maxpoll 6
Start the ntpd program and enable the system to start the ntpd program by default at the next startup:
chkconfig ntpd onservice ntpd start
4. Modify firewall rules
iptables -I INPUT -m udp -p udp --dport 123 -j ACCEPTip6tables -I INPUT -m udp -p udp --dport 123 -j ACCEPTservice iptables saveservice ip6tables save
After a period of synchronization, you can use the following command to test whether your machine can be properly served.
Ntpdate-Q server_ip
Server LIST
This site provides multiple servers for Network Time Service (available time servers in CERNET and available time servers in mainland China ).
Level 1 server:
ntp.neu.edu.cn (*)
Secondary server:
ntp.neu6.edu.cn (*)(P)clock.neu.edu.cn (*)(P)ntp.synet.edu.cn (P)s2f.time.edu.cn (P)
(*) Indicates the server that can be used in the Northeastern University without internet access. (P) indicates that the server is located in the public address pool of www.pool.ntp.org. in mainland China, there is a certain probability that the server will be used through the domain name [0-3] .pool.ntp.org. Note: Do not add the level 1 time server provided by this site to the public address pool of www.pool.ntp.org. The level 1 time server provides the time synchronization service for the Level 2 time server.
Use NTP to build your own NTP service