Configure NTP Server on FreeBSD

Configure a NTP time server on FreeBSD is fairly easy. We will spend about 10 minutes to configure a NTP Server on FreeBSD.

Select Global NTP Server to Sync

Before setting up configuration file, you might want to find out which global NTP servers to sync with on strategy locations. Strategy means select the NTP server nearby your country/continent. Here is the list of Asia NTP servers which can be obtained here If you already have selected NTP server to go with, put the URL into your NTP configuration file.

NTP Configure on ntp.conf

On FreeBSD, ntp.conf configuration file can be create at /etc/ntp.conf;

On ntp.conf file, here is the sample configuration;

On FreeBSD 8.0, there is a default configuration on for ntp.conf. That’s it, simple and nice ntp.conf ready. Make the necessary changes on the configuration to reflect the nearer NTP servers.

Starting NTP Service on FreeBSD

To enable ntpd on FreeBSD, add the follow configuration into /etc/rc.conf;

After service enabling has been defined, run the command below to start up ntpd.

NTP Server Post-install and Troubleshooting

It’s good to double check is ntpd started properly

Well, all is up. Let’s do ntpdate to sync your current time with your NTP time server

Opps, no server suitable for synchronization? Don’t panic, it’s normal error message. I

If you take a close look on the message, you will see an error message stated Server dropped: strata too high. It will take some time for your NTP time server to sync with the NTP servers you have configure on ntp.conf.

Run ntpdate again after approximately 15-30 minutes, your NTP time server should work now.