服務端 yum -y install ntp vim /etc/ntp.conf driftfile /var/lib/ntp/drift restrict 192.168.0.0 mask 255.255.255.0 nomodify restrict 192.168.1.0 mask 255.255.255.0 nomodify restrict 192.168.2.0 mask 255.255.255.0 nomodify server ntp.api.bz server time.windows.com iptables -A INPUT -p udp -m udp -dport 123 -j ACCEPT
客戶端:vim
crontab -e windows
*/5 * * * * ntpdate 192.168.1.3api