Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have set my NTP config to this:

# local server
server 127.0.0.1
fudge 127.0.0.1 stratum 10

# Only allow read-only access from localhost
restrict -4 default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1
restrict ::1

# Location of drift file
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log

Leaving public server definitions out, assuming that this would server my machines time.

Now, I set my date with date --set="+5 minutes", restart NTPd systemctl restart ntpd, and when I test my time server from Windows machine, I get:

An error occured while Windows was synchronizing with 192.168.1.160.
The peer is unreachable.

Whenever I add other server definitions to the configuration, it works.

How would I set up an NTP server that'd serve manually set time?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The problem was that Local Clock (LCL) explicitly needs 127.127.1.1 address instead of the default loopback, what I had assumed.

Quite tricky - that's what happens when you don't copy-paste configurations.

share|improve this answer

Your Answer

 
discard

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.