我正在尝试在centos 7上配置ntp服务器而不是在执行ntpq -p命令时显示INIT的ip地址。
我的ntp服务器配置文件。
/etc/ntp.conf
driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
# Hosts on local network are less restricted.
Allow 10.0.3.0/24 network clients to syncronize time with this server
restrict 10.0.3.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 2.in.pool.ntp.org
server 1.asia.pool.ntp.org
server 3.asia.pool.ntp.org
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
I have have following outputs while executing ntpq -q command
[centos@ip-10-0-3-53 etc]$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp.your.org .INIT. 16 u - 128 0 0.000 0.000 0.000
ns3.weiszhostin .INIT. 16 u - 128 0 0.000 0.000 0.000
resolver2.skyfi .INIT. 16 u - 128 0 0.000 0.000 0.000
ntp2.wiktel.com .INIT. 16 u - 128 0 0.000 0.000 0.000
[spryiq@ip-10-0-3-53 etc]$
Port 123 is listening correctly
[centos@ip-10-0-3-53 etc]$ netstat -plnu | grep 123
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
udp 0 0 10.0.3.53:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp6 0 0 fe80::10c9:ecff:fe9:123 :::* -
udp6 0 0 ::1:123 :::* -
udp6 0 0 :::123 :::* -
[centos@ip-10-0-3-53 etc]$ ntpstat
timeout
[centos@ip-10-0-3-53 etc]$ ntpq
ntpq> as
ind assid status conf reach auth condition last_event cnt
===========================================================
1 1255 8011 yes no none reject mobilize 1
2 1256 8011 yes no none reject mobilize 1
3 1257 8011 yes no none reject mobilize 1
4 1258 8011 yes no none reject mobilize 1
我已经正确配置了iptables。而不是INIT它应该显示ip地址我该如何解决这个问题?