Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
Sign in to follow this  
ianw1974

Creating your own ntp server

Recommended Posts

I managed to figure this out the other week, so decided to share it with you. In my example, I have my NTP server using the ip address of 172.20.12.230.

 

NTP Server config (machine using 172.20.12.230):

 

server  127.127.1.0	 # local clock
fudge   127.127.1.0 stratum 10

server pool.ntp.org

#the next entry sets this as the server and doesn't allow any modifications
restrict 172.20.12.230 mask 255.255.0.0 nomodify nopeer notrap

#the next line is required to ensure correct functionality
restrict 127.0.0.1 nomodify

# Drift file.  Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /etc/ntp/drift
multicastclient				 # listen on default 224.0.1.1
broadcastdelay  0.008

 

Desktop/Server config for machines to sync with your newly created ntp server:

 

server  127.127.1.0	 # local clock
fudge   127.127.1.0 stratum 10

#this is the server you want to synchronise with.  i'm using the hostname
#instead of the ip address of my machine - ensure /etc/hosts resolves it!
server elan

# Drift file.  Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /etc/ntp/drift
multicastclient				 # listen on default 224.0.1.1
broadcastdelay  0.008

 

the above config shows the hostname of my machine, called "elan". So, make sure your machine can ping the hostname, otherwise if not, use the ip address, or edit the /etc/hosts file so that it can ping the hostname.

 

And now you should have a fully functional ntp server on your network, and all your clients can sync with it. However, please note that it might take a few hours before the clients/servers that you have will start to synchronise. This is normal, because the stratum level is too high and will take a bit before it becomes usable as a ntp server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×