Vyatta and EdgeMax routers rely on an accurate system time for features such as logging, SSL Certificates and SSL VPN Clients/Servers (e.g. OpenVPN). If the time is inaccurate, the system may not work as expected. You can set the date and time using NTP as a time source, or manually. This is all done via the command line. Here’s how to do it:

Opening the Command Line Interface (CLI)

To follow any of these instructions, you must be in the Command Line Interface (CLI).  To do this either

  • Press the “CLI” button in the web interface (top right hand corner in the EdgeMax), or
  • Open up a SSH connection

Checking Current Date/Time

In the CLI, run the command “show date“. This will show the current timestamp, generally in GMT/UTC.

Checking Current NTP Servers

In the CLI, run the command “show ntp“. This will show the current NTP servers your EdgeMax/Vyatta will try and sync to, as well as the current difference in system time to NTP time.

To see just the configured FQDN of the NTP servers, run these two commands:
show system ntp server

Adding a NTP Server

To add in your own NTP servers, run these commands (substituting in the NTP servers you prefer). Check the NTP Pool Website for help in selecting a time server pool near you.

set system ntp server 0.au.pool.ntp.org prefer
set sytem ntp server 1.au.pool.ntp.org

Setting the Date/Time Manually

There may be times when you are unable to sync with a NTP server. Perhaps you’re like me and have done outside broadcasts on locked-down networks, where NTP servers aren’t readily available. In these situations it may be necessary to set the date and time manually. Here are the commands to manually set the time on your Vyatta or Ubiquiti EdgeMax hardware:

set date mmddhhmmyyyy

e.g. set date 080406102014
for Mon Aug 4 06:10:00 UTC 2014