Skip to main content
AUT_Maverick
Visitor III
January 19, 2024
Solved

NTP via FQDN

  • January 19, 2024
  • 2 replies
  • 3273 views

Hello, how can I use an FQDN for NTP?

Best answer by kaman

Hi AUT_Maverick,

 

To use a Fully Qualified Domain Name (FQDN) for NTP (Network Time Protocol) configuration, you can follow these steps:

 

1. Ensure that the DNS resolution is working from the FortiGate device. You can verify this by checking if the FortiGate can resolve the FQDN to the correct IP address.

 

2. Configure the FortiGate device to use a custom NTP server. This can be done through the CLI (Command Line Interface) using the following commands: ```

config system ntp
set ntpsync enable
set type custom
config ntpserver
edit 1
set server "ntpserver.local"
next
end
set server-mode enable
set interface "port2"
end

 

``` Replace "ntpserver.local" with the FQDN of your NTP server. If you have the IP address of the NTP server, you can use that instead.

 

3. Save the configuration and verify the synchronization status using the command `diag sys ntp status`. This will show you the synchronization status and the NTP servers being used. Please note that the FortiGate device should have proper network connectivity and DNS resolution to successfully synchronize with the NTP server using the FQDN.

 

Documentation Link: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configuring-a-FortiGate-unit-as-a-NTP-server/ta-p/190313

 

I hope it will help you.

2 replies

AEK
SuperUser
SuperUser
January 19, 2024

Just do that.

config system ntp
    set ntpsync enable
    set type custom
config ntpserver
  edit 1
    set server ntp.server.com
  next
end
AEK
kaman
Staff
kamanAnswer
Staff
January 19, 2024

Hi AUT_Maverick,

 

To use a Fully Qualified Domain Name (FQDN) for NTP (Network Time Protocol) configuration, you can follow these steps:

 

1. Ensure that the DNS resolution is working from the FortiGate device. You can verify this by checking if the FortiGate can resolve the FQDN to the correct IP address.

 

2. Configure the FortiGate device to use a custom NTP server. This can be done through the CLI (Command Line Interface) using the following commands: ```

config system ntp
set ntpsync enable
set type custom
config ntpserver
edit 1
set server "ntpserver.local"
next
end
set server-mode enable
set interface "port2"
end

 

``` Replace "ntpserver.local" with the FQDN of your NTP server. If you have the IP address of the NTP server, you can use that instead.

 

3. Save the configuration and verify the synchronization status using the command `diag sys ntp status`. This will show you the synchronization status and the NTP servers being used. Please note that the FortiGate device should have proper network connectivity and DNS resolution to successfully synchronize with the NTP server using the FQDN.

 

Documentation Link: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configuring-a-FortiGate-unit-as-a-NTP-server/ta-p/190313

 

I hope it will help you.