问题原文
原帖链接 · Howard · CC BY-SA 3.0
I have a CentOS 6.4 server, it does not have any iptable rules, it runs NTP daemon as service using the following configuration:
driftfile /var/lib/ntp/drift
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
restrict default ignore
restrict 127.0.0.1
When I run ntpq to query peers, the following response is received:
ntpq> peers
localhost.localdomain: timed out, nothing received
dig shows that:
localhost.localdomain. 86400 IN A 127.0.0.1
Why doesn't ntp query work?
已采纳解答
原帖链接 · Howard · CC BY-SA 3.0
I was expecting ntpq to query local server via 127.0.0.1, but it turns out to be querying local server via ethernet network interface.
Although I have no idea why a local ntp query would have to go through ethernet, but in configuration file I added
restrict <eht0 ip address>
And now NTP works fine.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
