FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
maulishshah
Staff
Staff
Article Id 292343
Description This article describes how to write a script to update FQDN IPs frequently.
Scope FortiGate.
Solution

To update the IP addresses associated with a specific FQDN regularly, run the following script.

This script facilitates the periodic updating of the FQDN cache at specified intervals:

 

config system auto-script
      edit <script name>
              set repeat 0 
              set interval 300 (time in seconds)
              set script 'config global <----- This is only required if the VDOM is configured
                  diagnose test application dnsproxy 5'   <----- It will try to fetch new IP addresses from Domain Sever.

                     set start manual
end

 

The script using the below command is enabled/started.


execute auto-script start <script name>


Note:

To modify the interval, use the 'execute auto-script stop <script name>' command, then modify the interval using the below commands:


config system auto-script
    edit <script name>
        set interval <time in seconds>   <----- It runs based on this interval.
    end