diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-02-26 22:50:05 +0000 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-02-26 22:50:05 +0000 |
commit | b9e07101d6347c0359fc68eac62e049acdfdbb78 (patch) | |
tree | 1829823bf808c85df9d3eae49d910f5f55ff3196 /templates/system | |
parent | 2bea0c31e1469bc5ac1b20fdb16598b6e0d11699 (diff) | |
download | vyatta-cfg-system-b9e07101d6347c0359fc68eac62e049acdfdbb78.tar.gz vyatta-cfg-system-b9e07101d6347c0359fc68eac62e049acdfdbb78.zip |
vyatta-cfg-system: redesign the layout and updating of ntp
When NTP is configured on the system, it not only acts as a client
for the configured servers, but also as a server. Although the server
is only available as a time source, it still represents a service that
the user hasn't specifically enabled.
This commit sets the default configuration of NTP to disallow all
external access, so the system acts purely as a client by default, and
also introduces the ability to configure which addresses / subnets are
allowed to both query and use it as a time source. If the servers
configured are specified as host names, these are resolved to IP
addresses before being added to ntp.conf, with the same process carried
out after name server changes.
syntax 'set system ntp client address'
Bug #94 http://bugzilla.vyos.net/show_bug.cgi?id=94
Diffstat (limited to 'templates/system')
-rw-r--r-- | templates/system/ntp/client/address/node.def | 6 | ||||
-rw-r--r-- | templates/system/ntp/client/node.def | 1 | ||||
-rw-r--r-- | templates/system/ntp/node.def | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/templates/system/ntp/client/address/node.def b/templates/system/ntp/client/address/node.def new file mode 100644 index 00000000..a48a2b5a --- /dev/null +++ b/templates/system/ntp/client/address/node.def @@ -0,0 +1,6 @@ +multi: +type: ipv4net,ipv6net +help: IP address + +val_help: ipv4net; IP address and prefix length +val_help: ipv6net; IPv6 address and prefix length diff --git a/templates/system/ntp/client/node.def b/templates/system/ntp/client/node.def new file mode 100644 index 00000000..dd849f8f --- /dev/null +++ b/templates/system/ntp/client/node.def @@ -0,0 +1 @@ +help: Network Time Protocol (NTP) client diff --git a/templates/system/ntp/node.def b/templates/system/ntp/node.def index 7a4ddad7..38e67e05 100644 --- a/templates/system/ntp/node.def +++ b/templates/system/ntp/node.def @@ -2,8 +2,7 @@ priority: 400 help: Network Time Protocol (NTP) configuration end: - /opt/vyatta/sbin/vyatta_update_ntp.pl </etc/ntp.conf >/tmp/ntp.conf - sudo cp -b /tmp/ntp.conf /etc/ntp.conf + sudo /opt/vyatta/sbin/vyatta_update_ntp.pl if grep -q '^server' /etc/ntp.conf then if pgrep -f -u ntp /usr/sbin/ntpd > /dev/null @@ -15,4 +14,3 @@ end: else sudo /usr/sbin/invoke-rc.d ntp stop fi - rm -f /tmp/ntp.conf |