Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

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