I tried all and googled a lot! But I can't make work NTP on my server. This post is last hope!
I have installed ntp on debian server with this configuration (/etc/ntp.conf):
driftfile /var/lib/ntp/ntp.drift
statdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.it.pool.ntp.org iburst
server 1.it.pool.ntp.org iburst
server 2.it.pool.ntp.org iburst
server 3.it.pool.ntp.org iburst
restrict -4 default nomodify nopeer noquery notrap
restrict -6 default nomodify nopeer noquery notrap
# Restrict eth0 ip
restrict 192.168.1.1
restrict 127.0.0.1 noserve nomodify
restrict ::1
Now when I try:
ntpq -pn
127.0.0.1: timed out, nothing received
***Request timed out
When I try:
ntpdate -q
9 Mar 18:08:01 ntpdate[27896]: no servers can be used, exiting
But with:
ntpdate -d 0.it.pool.ntp.org
I recieve incoming packets and set time offset. This lead me to wrong ntp.conf configuration.
Any clues why this is happening.