Added support for setting network addresses from where clients can query time.
This commit is contained in:
parent
1a8c48db00
commit
42b916a783
2 changed files with 11 additions and 0 deletions
|
@ -5,6 +5,10 @@
|
||||||
# $ntp_server:
|
# $ntp_server:
|
||||||
# Array of NTP servers.
|
# Array of NTP servers.
|
||||||
#
|
#
|
||||||
|
# $ntp_client_networks:
|
||||||
|
# Array of networks that are allowed to query this server in format
|
||||||
|
# [ "192.168.1.0/255.255.255.0", "192.168.2.0/255.255.255.0", ].
|
||||||
|
#
|
||||||
class ntpd {
|
class ntpd {
|
||||||
|
|
||||||
if !$ntp_server {
|
if !$ntp_server {
|
||||||
|
|
|
@ -26,3 +26,10 @@ server <%= server %>
|
||||||
server 127.127.1.0
|
server 127.127.1.0
|
||||||
fudge 127.127.1.0 stratum 10
|
fudge 127.127.1.0 stratum 10
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if ntp_client_networks -%>
|
||||||
|
|
||||||
|
# Restrictions for clients using us as source.
|
||||||
|
<% ntp_client_networks.each do |net| -%>
|
||||||
|
restrict <%= net.split("/")[0] %> mask <%= net.split("/")[1] %> nomodify notrap
|
||||||
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue