client configuration:
#
system-config-date
take care selinux and firewall
# setsebool -P ntpd_disable_trans 1
#To make NTP work with a firewall, you'll need to open access in port 123
#To make NTP work with a firewall, you'll need to open access in port 123
#chkconfig ntpd on
Server configuration:
#vi /etc/ntp.conf.
restrict 10.11.12.0 mask 255.255.255.0 nomodify notrap
The following default
restrict directives limit administrative access to the local system for the IPv4 and IPv6 loopback addresses:
restrict 127.0.0.1 restrict -6 ::1
If you want to add a remote administrative interface, specify its IP address with another directive:
restrict 10.11.12.13
# service ntpd start
转载于:https://blog.51cto.com/johnnyxing/197164