How do you use VyOS as a ntp server?

Hi,

I’m running the latest version of the VyOS. How do I use this as an NTP server? Essentially an NTP master?

Please let me know.

Thanks!

Hi,
You need to configure your firewall to accept the port 123 UDP from your local network.
Assuming your server has the address of 1.2.3.4 and the LAN network is 1.2.3.0/24:

set firewall name FIREWALL-IN rule XXX description ‘NTP SERVER’
set firewall name FIREWALL-IN rule XXX destination address 1.2.3.4
set firewall name FIREWALL-IN rule XXX destination port 123
set firewall name FIREWALL-IN rule XXX protocol udp
set firewall name FIREWALL-IN rule XXX source address 1.2.3.0/24
set firewall name FIREWALL-IN rule XXX action accept

then sudo su and edit /etc/ntp.conf and add at the end of the file:

broadcast 1.2.3.4
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable

You assumed that FIREWALL-IN name already applied to an interface… some readers won’t have that in mind. Would be good to add line that assigns the firewall name to an interface.