/etc/ntp.conf
Базовый конфигурационный файл:
statsdir /var/log/ntpstats/ driftfile /var/lib/ntp/ntp.drift 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 ntp.ubuntu.com prefer iburst server 0.ru.pool.ntp.org server 1.ru.pool.ntp.org restrict default kod notrap nomodify nopeer noquery restrict 127.0.0.1 nomodify notrap restrict ::1 nomodify notrap logconfig =syncstatus +sysevents +peerall
Базовый конфигурационный файл:
driftfile /var/lib/ntp/ntp.drift statsdir /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 ntp1.domain.com prefer iburst server ntp2.domain.com server ntp3.domain.com server ntp4.domain.com restrict default ignore restrict ntp1.domain.com noquery notrap restrict ntp2.domain.com noquery notrap restrict ntp3.domain.com noquery notrap restrict ntp4.domain.com noquery notrap restrict 127.0.0.1 nomodify notrap restrict ::1 nomodify notrap logconfig =syncstatus +sysevents +peerall
Проверить значения NTP сервера с клиента:
ntpdate -q <SERVER_NTP>
Проверить значения NTP сервера с сервера:
ntpq -pn
В таблице указываются следующие параметры:
Слева от адреса сервера могут быть указаны следующие символы:
https://docs.ntpsec.org/latest/ntp_conf.html - Описание ntp.conf
https://blog.selectel.ru/nastrojka-ntp-na-servere/ - Настройка NTP на сервере