100
Figure 126:
Bash ntpd
–b
Create a backup of the original file (/etc/ntp.conf) :
[bash]#cp /etc/ntp.conf /etc/ntp.conf.original
Edit the configuration as follows:
[bash]#
vi /etc/ntp.conf
The following information are required into the /etc/ntp.conf file :
#Finding a Time Source.
# The default configuration for ntpd servers after version 4.2 uses the NTP #Pool for
the default server sources.
Server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
# Access Controls.
restrict default kod nomodify notrap noquery nopeer
#The NTP Pool servers have been listed as a time source already (ver 4.2
#onwards), and they too need restrictions applied so the local server can
#synchronise from them. Ensure the access control parameters are strict #enough
that the remote servers can only be used for queries.
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap
noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap
noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap
noquery
# To allow all the workstations inside the internal private network to be able to query
the #time from your server, use the following access control rule (adjust subnet if
needed).