Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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


  restrict default ignore

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

Why doesn't ntp query work?

share|improve this question
Do you have a local IPtables running? – Sami Laine Dec 2 '13 at 7:08
iptable is running, but there isnt any rule. – Howard Dec 2 '13 at 7:10
And ntp-daemon is actually running? Try grep ntp /var/log* to see if there are some notices which might help? – Sami Laine Dec 2 '13 at 7:27
are you able to ping and others in the list ? – slayedbylucifer Dec 2 '13 at 8:42
Do you have an entry for localhost or localhost.localdomain in /etc/hosts? The system will look here first, before checking DNS. – user215543 Apr 8 '14 at 11:26

2 Answers 2

On RHEL / CentOS 6 and 7, for whatever reason ntpq tries to query the IPv6 loopback at ::1 instead of the IPv4 loopback at With this in mind, I added this line to my /etc/ntp.conf file:

restrict ::1

Saved the file then restarted ntpd (service ntpd restart) and now the command:

ntpq -p

works as expected. (This is the same as running ntpq in command-line mode and then issuing the peers command.)

I prefer this solution since you do not have to enable communications with ntpd via a potentially public Ethernet interface, which may be a security concern.

share|improve this answer
up vote 2 down vote accepted

I was expecting ntpq to query local server via, 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.