How-To: Setup an NTP Server in Mac OS X

How-To: Setup an NTP Server in Mac OS X

It’s been a while… Here is a simple guide in setting up an NTP Server in your Mac OS X. Although it does look trivial, it took me a while to figure it out (and find solutions out there). Steps 1 & 2 are important, as it does the trick.

  1. Disable the synchronizing of the local clock to ntp. Uncheck “Set date & time automatically.”
  2. If you find NTP in the services offered in Server Admin, stop it also.
  3. Open the Terminal. Create or edit /etc/ntp.conf and add the ntp servers from where you will synch.
  4. server minpoll 12 maxpoll 17
    server minpoll 12 maxpoll 17
    server minpoll 12 maxpoll 17
    server minpoll 12 maxpoll 17
    server minpoll 12 maxpoll 17

  5. Edit or check /etc/ntp-restrict.conf. Add the allowed ip address range to synch with your server.
  6. restrict mask nomodify notrap
    restrict mask nomodify notrap

  7. Edit /etc/hostconfig.

  9. Reboot server.
  10. Check if process is running: ps ax| grep ntp
  11. Check if it is synching with external ntp servers: ntpq -p
  • Ian

    I tried to get this working before with much pain, even tried installing NTP from other sources. I stumbled across your blog entry here and it does indeed solve my problem (i had DNS screwing up because primary and secondary were out of time sync).
    thanks a lot. great post.

  • Thanks so much for this! You saved me 😀

  • Alistair

    It’s funny that you say “staps 1&2…” when your steps are enumerated by letter.

    • this was a result of changing my themes, i believe. I didn’t have time to check all the entries. 

  • Mike

    Thanks for post…  still working in Dec 2012.  🙂

  • Ced

    Thankyou for this tutorial, i used it on Maverick (OSX 10.9.2 – 25/04/2014) and it work perfectly… But i precise, i had to enable Time synching in Date & Time preference panel…

  • marcel

    Thank you for your post. I think I found an even easier solution, but I anybody sees a problem with it, please comment!
    In the date and time systemsettings I set instead of and let the clients point to this machine. Seems to work with me.

    • Rafael González

      hey marcel!! how do yo do this? i set that ip . but i need to do something more??

  • Russel Peter

    how to Check step 2 ??

Comments are closed.