NTP服务基础配置
基础的NTP配置
# Drift file.
driftfile /var/lib/ntp/drift
pidfile /var/run/ntp.pid
logfile /var/log/ntp.log
# Permit all access over the loopback interface.
restrict 127.0.0.1
restrict ::1
# 允许本地局域网较少限制,这样局域网服务器可以从这个NTP服务器同步时间
restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
restrict 10.1.1.0 mask 255.255.255.0 notrust nomodify notrap
# 使用公共的pool.ntp.org提供的时间服务器来作为上游NTP服务器
# 这样部署的NTP服务器可以校准自己的时钟
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
# 其他有关 server 配置案例
# server 0.centos.pool.ntp.org iburst minpoll 4 maxpoll 6 prefer
# server 1.centos.pool.ntp.org iburst minpoll 4 maxpoll
server 127.127.1.0
fudge 127.127.1.0 stratum 10NTP配置解析
NTP实践问题排查
restrict回环地址和IPv6
restrict回环地址和IPv6参考
Last updated