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 by admica   @   1 October 2009

Related Posts

Like this post? Share it!

Digg Twitter StumbleUpon Delicious Technorati Facebook RSS

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« Do you organize your internal DNS to allow for future expansion?
Next Post
Who’s afraid of a little swine flu? »
Powered by Wordpress   |   Lunated designed by ZenVerse