NTP version installed: ntp-4.2.6p5-5
I'm trying to understand the usage and meaning of the
ntp restrict along with
restrict default nopeer
Quoting the NTP documentation:
nopeer: Deny packets that might mobilize an association unless authenticated. This includes broadcast, symmetric-active and manycast server packets when a configured association does not exist. It also includes pool associations, so if you want to use servers from a pool directive and also want to use nopeer by default, you'll want a "restrict source ..." line as well that does not include the nopeer directive. Note that this flag does not apply to packets that do not attempt to mobilize an association.
Does it mean, when we are using
restrict default nopeer, we can't associate peers without authentication. (without using keys) ?
Consider the following scenario:
Server config: ip- 10.12.12.12
[root@sdp_1 ~]# cat /etc/ntp.conf server 10.12.10.53 #restrict default kod nomodify nopeer noquery notrap #restrict -6 default kod nomodify nopeer noquery notrap #restrict 127.0.0.1 #restrict -6 ::1 restrict default nopeer keys /etc/ntp/keys
Peer config: ip- 10.12.12.11
[root@sdp_2 ~]# cat /etc/ntp.conf #server 10.12.10.53 #restrict default kod nomodify nopeer noquery notrap #restrict -6 default kod nomodify nopeer noquery notrap #restrict 127.0.0.1 #restrict -6 ::1 restrict default nopeer peer 10.12.12.12 minpoll 4 keys /etc/ntp/keys
Still i can see PEER associations at 10.12.12.11 as below:
ntpq> associations ind assid status conf reach auth condition last_event cnt =========================================================== 1 48387 961a yes yes none sys.peer sys_peer 1 ntpq> [root@sdp_2 ~]# ntpq -np remote refid st t when poll reach delay offset jitter ============================================================================== *10.12.12.12 10.12.10.53 5 u 13 16 377 0.211 8.953 0.842
Are my assumptions are right ?