NTP & OS X Server 10.9 & Above

I have previously written about Apple’s server offering losing services. Since then they put a couple of them back, namely DHCP and DNS, but I’ve found since Mountain Lion Server they’ve apparently discontinued the Network Time Protocol server. NTP is the service that sets your computer’s time to a network based server, doing so synchronizes your time on all of your computers & devices.

In 10.6 & 10.7 it was just a checkbox to turn it on. In 10.8 you had to use the terminal to enable it using sudo serveradmin settings info:ntpTimeServe = yes, however in 10.9 doing this returns an error, “info = _empty_dictionary” which is Server.app speak for an empty service (non-existant) item. Sure enough, sudo serveradmin list no longer shows NTP in the service list. *sigh*

You can still use the native OS X client to enable an NTP server since it isn’t part of server, and it isn’t that hard to do. To get a NTP server up and running, open up terminal and edit the file at /private/etc/ntp-restrict.conf

It will look like the below with my additions in bold:

# Access restrictions documented in ntp.conf(5) and
# http://support.ntp.org/bin/view/Support/AccessRestrictions
# Limit network machines to time queries only

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# localhost is unrestricted
restrict 127.0.0.1
restrict -6 ::1

# local lan is unrestricted
restrict 10.0.1.0 mask 255.255.255.0

includefile /private/etc/ntp.conf
includefile /private/etc/ntp_opendirectory.conf

So there you go, just add your network info as it pertains to you and set your clients to point at your server.

This entry was posted in macOS Server, Tech Trinkets and tagged . Bookmark the permalink.

2 Responses to NTP & OS X Server 10.9 & Above

  1. Pingback: Upgrading PHP on OS X Server | The Major's Home

  2. Pingback: Upgrading or Downgrading PHP on OS X Server | The Major's Home

Leave a Reply

Your email address will not be published. Required fields are marked *