Solved How To Make ntp In Server Mode Work?

You guys are going to think I'm outta my mind.

FreeBDSD v13.3, using the base-included NTP, ntpd 4.2.8p16-a (1).

/etc/ntp.conf
Code:
tos minclock 5 maxclock 8

pool clock.isc.org iburst
pool time.nist.gov iburst

# allow unrestricted access from the localhost
restrict 10.0.0.1/24 nomodify notrap
# ignore all interfaces...
interface ignore wildcard
# except these
interface listen 10.0.0.1

/etc/rc.conf
Code:
ntpd_enable="YES"
ntpd_sync_on_start="YES"

Fired up the daemon with this: /etc/rc.d/ntpd start

after some time
ntpq -pn
Code:
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 clock.isc.org   .POOL.          16 p    -   64    0    0.000   +0.000   0.000
 time.nist.gov   .POOL.          16 p    -   64    0    0.000   +0.000   0.000
*132.163.96.2    .NIST.           1 u   27   64  377   14.555   -3.197   3.607
+64.62.194.189   206.55.64.77     3 u   31   64   77   35.400   -2.106   1.401
+204.93.207.11   206.55.64.77     3 u   25   64   77   33.160   -8.114   2.155
+64.62.194.188   206.55.64.76     3 u   25   64   77   35.571   -3.736   2.221
+132.163.96.1    .NIST.           1 u   29   64   37   13.277   -1.833   1.328

The ntp daemon is clearly doing its client duty.

My problem: The ntp daemon will not act as a server at all. It refuses to respond to LAN time queries from any of my other devices. On my Windows machine I'm using "NTPTool" and it gets no response to ntp server queries. When I use NTPTool to bypass the FreeBSD ntp server it receives proper time responses.

I'm of the opinion that the base-installed ntp daemon *only* works as a client and not as a server. I've spent the afternoon reading how-tos dating back for years and none of the declarative, "This works, do this.", work. None. Nada. Zilch.

Even the FreeBSD handbook claims the ntp daemon can act as a local network time reference server...but it doesn't explain how to do it.

What am I doing wrong?
 
Last edited by a moderator:
# Allow LAN machines to synchronize with this ntp server
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
 
You don't appear to be using the default ntp.conf, which includes the following:
Code:
# Security:
#
# By default, only allow time queries and block all other requests
# from unauthenticated clients.
#
# The "restrict source" line allows peers to be mobilized when added by
# ntpd from a pool, but does not enable mobilizing a new peer association
# by other dynamic means (broadcast, manycast, ntpq commands, etc).
#
# See http://support.ntp.org/bin/view/Support/AccessRestrictions
# for more information.
#
restrict default limited kod nomodify notrap noquery nopeer
restrict source  limited kod nomodify notrap noquery
 
Well, this is embarrassing.

gpw928 - you are right that I'm not using the default .conf file. For whatever reason when I used the two restrict lines above and restarted ntp it locked up and I had to quit the ssh session. I'll try it again and see but omitting those lines doesn't seem to prevent ntp from working as I wish.

Alain De Vos - the link to the Ubuntu article is very good. I'll need to study it more. When I was doing my Google searching I limited the search criteria to FreeBSD info which I see now was too narrow. I also added the 'restrict' line you proffered.

The ntp server is now working on my FreeBSD box. Apparently the Windows NTPTool doesn't work for me; it returns nothing even though the ntp client on the Windows box is working with the local network ntp server. When I fired up another FreeBSD machine it was immediately able to talk to the ntp server.

I was using OpenNTP for many years and wanted to get 'back to basics', as it were.

Thank you both.
 
Back
Top