我尝试了所有并在谷歌上搜索了很多!但是我无法在我的服务器上使用 NTP。这篇文章是最后的希望!我已使用此配置 ( )在 debian 服务器上安装了ntp/etc/ntp.conf:
driftfile /var/lib/ntp/ntp.drift
statdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.it.pool.ntp.org iburst
server 1.it.pool.ntp.org iburst
server 2.it.pool.ntp.org iburst
server 3.it.pool.ntp.org iburst
restrict -4 default nomodify nopeer noquery notrap
restrict -6 default nomodify nopeer noquery notrap
# Restrict eth0 ip
restrict 192.168.1.1
restrict 127.0.0.1 noserve nomodify
restrict ::1
Run Code Online (Sandbox Code Playgroud)
现在当我尝试:
ntpq -pn
127.0.0.1: …Run Code Online (Sandbox Code Playgroud)