3

I can only get results from:

ntpq -p localhost
or
ntpq -p 127.0.0.1

If, from the same server, I try it as either the external IP address or domain name then it times out with no response.

ntpq -p files.tickzoom.com
or
ntpq -p 50.57.65.92

Those both time out from the same machine.

I disabled iptables. So iptables -L shows:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

The goal, actually is to access ntpd from other machines. But they can't access that IP or DNS either even with firewall off.

At first I went round and round with iptables rules before disabling iptables and realizing I can't do this even with the firewall off.

Please clue my in to what's going on.

1 Answer 1

4

It looks like you need to modify the ntp configuration /etc/ntp.conf file to allow requests to the other interfaces of the server besides the loopback. The entry to modify is the noquery field in the restrict line. The noquery field prevents everyone from querying the status of your time server.

For IPv4,

restrict -4 default kod notrap nomodify nopeer noquery

change to

restrict -4 default kod notrap nomodify nopeer query

Then restart the ntp service. You might need to do more reading on the modify, peer, and query field in the restrict for a better setup.

At the same time, make sure ntp is listening on all interfaces using netstat, using the -u switch for udp

netstat -anu | grep 123

udp        0      0 0.0.0.0:123             0.0.0.0:*                           19339/ntpd
2
  • This was "spot on"! You rock. It works now. And, yes, I found docs on the ntpd restrict command and your suggestion to only open query is excellent.
    – Wayne
    Mar 6, 2013 at 17:36
  • hey since you solve it so quickly, why not upvote my question. Just a thought.
    – Wayne
    Mar 6, 2013 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .