Fortinet white logo
Fortinet white logo

CLI Reference

config system ntp

config system ntp

Configure system NTP information.

config system ntp
    Description: Configure system NTP information.
    set authentication [enable|disable]
    set interface <interface-name1>, <interface-name2>, ...
    set key {password}
    set key-id {integer}
    set key-type [MD5|SHA1]
    config ntpserver
        Description: Configure the FortiGate to connect to any available third-party NTP server.
        edit <id>
            set server {string}
            set ntpv3 [enable|disable]
            set authentication [enable|disable]
            set key {password}
            set key-id {integer}
            set interface-select-method [auto|sdwan|...]
            set interface {string}
        next
    end
    set ntpsync [enable|disable]
    set server-mode [enable|disable]
    set source-ip {ipv4-address}
    set source-ip6 {ipv6-address}
    set syncinterval {integer}
    set type [fortiguard|custom]
end

config system ntp

Parameter

Description

Type

Size

authentication

Enable/disable authentication.

option

-

Option

Description

enable

Enable authentication.

disable

Disable authentication.

interface <interface-name>

FortiGate interface(s) with NTP server mode enabled. Devices on your network can contact these interfaces for NTP services.

Interface name.

string

Maximum length: 79

key

Key for authentication.

password

Not Specified

key-id

Key ID for authentication.

integer

Minimum value: 0 Maximum value: 4294967295

key-type

Key type for authentication (MD5, SHA1).

option

-

Option

Description

MD5

Use MD5 to authenticate the message.

SHA1

Use SHA1 to authenticate the message.

ntpsync

Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.

option

-

Option

Description

enable

Enable synchronization with NTP Server.

disable

Disable synchronization with NTP Server.

server-mode

Enable/disable FortiGate NTP Server Mode. Your FortiGate becomes an NTP server for other devices on your network. The FortiGate relays NTP requests to its configured NTP server.

option

-

Option

Description

enable

Enable FortiGate NTP Server Mode.

disable

Disable FortiGate NTP Server Mode.

source-ip

Source IP address for communication to the NTP server.

ipv4-address

Not Specified

source-ip6

Source IPv6 address for communication to the NTP server.

ipv6-address

Not Specified

syncinterval

NTP synchronization interval.

integer

Minimum value: 1 Maximum value: 1440

type

Use the FortiGuard NTP server or any other available NTP Server.

option

-

Option

Description

fortiguard

Use the FortiGuard NTP server.

custom

Use any other available NTP server.

config ntpserver

Parameter

Description

Type

Size

id

NTP server ID.

integer

Minimum value: 0 Maximum value: 4294967295

server

IP address or hostname of the NTP Server.

string

Maximum length: 63

ntpv3

Enable to use NTPv3 instead of NTPv4.

option

-

Option

Description

enable

Enable NTPv3.

disable

Disable NTPv3 (use NTPv4).

authentication

Enable/disable MD5(NTPv3)/SHA1(NTPv4) authentication.

option

-

Option

Description

enable

Enable MD5(NTPv3)/SHA1(NTPv4) authentication.

disable

Disable MD5(NTPv3)/SHA1(NTPv4) authentication.

key

Key for MD5(NTPv3)/SHA1(NTPv4) authentication.

password

Not Specified

key-id

Key ID for authentication.

integer

Minimum value: 0 Maximum value: 4294967295

interface-select-method

Specify how to select outgoing interface to reach server.

option

-

Option

Description

auto

Set outgoing interface automatically.

sdwan

Set outgoing interface by SD-WAN or policy routing rules.

specify

Set outgoing interface manually.

interface

Specify outgoing interface to reach server.

string

Maximum length: 15

config system ntp

config system ntp

Configure system NTP information.

config system ntp
    Description: Configure system NTP information.
    set authentication [enable|disable]
    set interface <interface-name1>, <interface-name2>, ...
    set key {password}
    set key-id {integer}
    set key-type [MD5|SHA1]
    config ntpserver
        Description: Configure the FortiGate to connect to any available third-party NTP server.
        edit <id>
            set server {string}
            set ntpv3 [enable|disable]
            set authentication [enable|disable]
            set key {password}
            set key-id {integer}
            set interface-select-method [auto|sdwan|...]
            set interface {string}
        next
    end
    set ntpsync [enable|disable]
    set server-mode [enable|disable]
    set source-ip {ipv4-address}
    set source-ip6 {ipv6-address}
    set syncinterval {integer}
    set type [fortiguard|custom]
end

config system ntp

Parameter

Description

Type

Size

authentication

Enable/disable authentication.

option

-

Option

Description

enable

Enable authentication.

disable

Disable authentication.

interface <interface-name>

FortiGate interface(s) with NTP server mode enabled. Devices on your network can contact these interfaces for NTP services.

Interface name.

string

Maximum length: 79

key

Key for authentication.

password

Not Specified

key-id

Key ID for authentication.

integer

Minimum value: 0 Maximum value: 4294967295

key-type

Key type for authentication (MD5, SHA1).

option

-

Option

Description

MD5

Use MD5 to authenticate the message.

SHA1

Use SHA1 to authenticate the message.

ntpsync

Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.

option

-

Option

Description

enable

Enable synchronization with NTP Server.

disable

Disable synchronization with NTP Server.

server-mode

Enable/disable FortiGate NTP Server Mode. Your FortiGate becomes an NTP server for other devices on your network. The FortiGate relays NTP requests to its configured NTP server.

option

-

Option

Description

enable

Enable FortiGate NTP Server Mode.

disable

Disable FortiGate NTP Server Mode.

source-ip

Source IP address for communication to the NTP server.

ipv4-address

Not Specified

source-ip6

Source IPv6 address for communication to the NTP server.

ipv6-address

Not Specified

syncinterval

NTP synchronization interval.

integer

Minimum value: 1 Maximum value: 1440

type

Use the FortiGuard NTP server or any other available NTP Server.

option

-

Option

Description

fortiguard

Use the FortiGuard NTP server.

custom

Use any other available NTP server.

config ntpserver

Parameter

Description

Type

Size

id

NTP server ID.

integer

Minimum value: 0 Maximum value: 4294967295

server

IP address or hostname of the NTP Server.

string

Maximum length: 63

ntpv3

Enable to use NTPv3 instead of NTPv4.

option

-

Option

Description

enable

Enable NTPv3.

disable

Disable NTPv3 (use NTPv4).

authentication

Enable/disable MD5(NTPv3)/SHA1(NTPv4) authentication.

option

-

Option

Description

enable

Enable MD5(NTPv3)/SHA1(NTPv4) authentication.

disable

Disable MD5(NTPv3)/SHA1(NTPv4) authentication.

key

Key for MD5(NTPv3)/SHA1(NTPv4) authentication.

password

Not Specified

key-id

Key ID for authentication.

integer

Minimum value: 0 Maximum value: 4294967295

interface-select-method

Specify how to select outgoing interface to reach server.

option

-

Option

Description

auto

Set outgoing interface automatically.

sdwan

Set outgoing interface by SD-WAN or policy routing rules.

specify

Set outgoing interface manually.

interface

Specify outgoing interface to reach server.

string

Maximum length: 15