[ntp:questions] Errors in "restrict" lines

girino66 at gmail.com girino66 at gmail.com
Mon Jun 26 13:08:52 UTC 2017


Le lundi 26 juin 2017 08:32:02 UTC+2, David Taylor a écrit :
> Folks,
> 
> I will be the first to admit that I'm not very conversant with 
> "restrict" lines, so perhaps the following will be obvious to you!  I 
> have in lines 34 onwards of my ntp.conf:
> 
> # Suggestions for NTP restrictions:
> restrict source notrap nomodify nopeer query
> restrict 127.0.0.1
> restrict ::1
> restrict 192.168.0.0 mask 255.255.255.0 peer
> 
> and NTP is giving the following error messages:
> 
> Jun 26 05:58:10 raspi-4 ntpd[2776]: line 35 column 29 syntax error, 
> unexpected T_String, expecting T_EOC
> Jun 26 05:58:10 raspi-4 ntpd[2776]: syntax error in /etc/ntp.conf line 
> 35, column 29
> Jun 26 05:58:10 raspi-4 ntpd[2776]: line 38 column 32 syntax error, 
> unexpected T_Peer, expecting T_EOC
> Jun 26 05:58:10 raspi-4 ntpd[2776]: syntax error in /etc/ntp.conf line 
> 38, column 32
> 
> I am at a loss to explain these errors....
> 
> Can you help?
> 
> If it's some non-printing character, how in Debian (Raspbian) Linux 
> could I dump the file in hex to check for that?
> 
> 
> -- 
> Thanks,
> David
> Web: http://www.satsignal.eu

Hi,

Perhaps the problem comes from the first line when it's asked:
restrict source ... query

It is possible that the word 'query' is not recognize, usually 'restrict' command is used to disable services and not to enable them.

Best,
Jean-Michel



More information about the questions mailing list