CentOS 7.4 には、次の /etc/ntp.conf があります。
# /etc/ntp.conf: Ansible managed
# drift file
driftfile /var/lib/ntp/drift
# restrictions
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
# preferred servers
server 0.centos.pool.ntp.org iburst prefer
server 1.centos.pool.ntp.org iburst prefer
server 2.centos.pool.ntp.org iburst prefer
server 3.centos.pool.ntp.org iburst prefer
# fallback servers
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst
# listen only on local interfaces
interface ignore wildcard
interface listen 127.0.0.1
interface listen ::1
# Disable the monitoring facility to prevent amplification attacks; see CVE-2013-5211
disable monitor
ただし、IPv4でのみバインドされていることがわかります。
[root@0c6790c4704c /]# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 127.0.0.1:123 0.0.0.0:* 918/ntpd
ログは次のとおりです。
Jan 08 01:34:05 0c6790c4704c systemd[1]: Starting Network Time Service...
Jan 08 01:34:05 0c6790c4704c ntpd[918]: proto: precision = 0.064 usec
Jan 08 01:34:05 0c6790c4704c ntpd[918]: 0.0.0.0 c01d 0d kern kernel time sync enabled
Jan 08 01:34:05 0c6790c4704c systemd[1]: Started Network Time Service.
Jan 08 01:34:05 0c6790c4704c ntpd[918]: ntp_io: estimated max descriptors: 65536, initial socket boundary: 16
Jan 08 01:34:05 0c6790c4704c ntpd[918]: Listen normally on 0 lo 127.0.0.1 UDP 123
Jan 08 01:34:05 0c6790c4704c ntpd[918]: Listening on routing socket on fd #17 for interface updates
Jan 08 01:34:07 0c6790c4704c ntpd[918]: 0.0.0.0 c016 06 restart
Jan 08 01:34:07 0c6790c4704c ntpd[918]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
Jan 08 01:34:07 0c6790c4704c ntpd[918]: 0.0.0.0 c011 01 freq_not_set
私が見落としたことはありますか?
ベストアンサー1
/etc/default/ntp
含まれていることを確認してください。NTPD_OPTS='-4 -g'
このオプションは、-4
ntpd が ipv4 でのみ受信するように指示します。