The simplest NTP configuration for a home network


I was curious about using NTP to keep a few stand-alone machines synchronized. None of them have access to the outside world, or access to another host that has access to the outside world – they’re completely cut off.

So how do you run a NTP server with no upstream time source? Easy!

Here’s the config on the NTP server:
====$ cat /etc/ntp.conf====

driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict default nomodify
broadcast 255.255.255.255 autokey
server 127.127.1.0
fudge 127.127.1.0 stratum 10

Here’s the config on all the clients:
====$ cat /etc/ntp.conf====

driftfile /var/lib/ntp/drift
restrict default
server host1

In this case my NTP server’s name is “host1″. I don’t care about authenticated requests or only allowing specific hosts to update the times. This configuration isn’t good for a regular desktop machine and especially not for a server. But for a stand-alone that nobody will have network access to, it will get the job done with the simplest configuration possible.

If for some strange reason your /etc is shared (nfs perhaps?) then you’ll have to make the server load up a specific configuration file. You can easily get away with a simple “if” hostname statement to load a different ntp.conf for the server from the init script.


Posted on October 1st, by admica in Linux, networking.
Comments Off

Comments are closed.