Home > How-To > 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 0.asia.pool.ntp.org minpoll 12 maxpoll 17
    server 1.asia.pool.ntp.org minpoll 12 maxpoll 17
    server 2.asia.pool.ntp.org minpoll 12 maxpoll 17
    server 3.asia.pool.ntp.org minpoll 12 maxpoll 17
    server 0.jp.pool.ntp.org 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 10.0.0.0 mask 255.0.0.0 nomodify notrap
    restrict 202.92.128.0 mask 255.255.224.0 nomodify notrap

  7. Edit /etc/hostconfig.
  8. TIMESYNC=-NO-
    TIMESERV=-YES-

  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
Categories: How-To Tags: , ,
  1. Ian
    Tuesday, 30 Jun 09 at 01:56:20 am | #1

    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.