NTP Server is very useful If you have lots of server and desktop system. Your NTP server contacts a central NTP server, provided by your ISP or a public time server located at ntp.org, to obtain accurate time data. The server then allows other machines on your network to request the time data. The server then allows other machines on your network to request the time data.

Consider the following sample setup:           ==> CentOS / Fedora / RHEL NTPD Server.            ==> ISP remote NTP server.      ==> NTP clients including desktop systems.

First, install and enable ntpd on
[root@server~]# yum install ntp
[root@server~]# chkconfig ntpd on

Now open /etc/ntp.conf:
[root@server~]# vim /etc/ntp.conf

Make sure the following line exits:
restrict default ignore

Above will deny all access to any machine, server or client. However, you need to specifically authorized policy settings. Set it as follows:

restrict mask nomodify notrap noquery


Replace and mask with actual remote ISP or ntp.org NTP server IP.

Save and close the file.

Configure NTP clients to access your NTP Server

Now, you need to allow legitimate NTP clients to access the Server. For example, allow network to synchronize to this server located at Open /etc/ntp.conf and add policy as follows:

# Hosts on local network are less restricted.

restrict mask nomodify notrap

Update your firewall settings, open /etc/sysconfig/iptables.
[root@server~]# vim  /etc/sysconfig/iptables
Add the following line, before the final LOG and DROP lines for the RH-Firewall-1-INPUT chain:

-A RH-Firewall-1-INPUT -s -m state –state NEW -p udp –dport 123 -j ACCEPT

Save and close the file. Finally, start ntpd:
[root@server~]# service ntpd start
[root@server~]# service iptables restart
[root@server~]# netstat -tulpn

Posted in: Linux.
Last Modified: January 12, 2017

Leave a reply