Skip to main content
axel_gonzalez_FTNT
Staff
Staff
May 4, 2017

Technical Note: How to configure auto-script with example for v5.4 firmware

  • May 4, 2017
  • 0 replies
  • 4387 views
Description
This article gives an example of how to configure auto-script using v5.4 firmware.

Solution
The first step is to install an FTP or TFTP and to validate that there neither a Windows firewall or anything else blocking the connection from the FortiGate to the FTP.

agonzalez_FD40450_Captura1.JPG

In this example the IP address of the FTP server is configured as 10.0.2.10 with user "admin" and password "admin":
config system auto-script
edit test
set interval 1
set repeat 0
set start auto
set script "execute backup config ftp FGT_AUTOCOFING.conf 10.0.2.10 admin admin"
end
where
  • Interval is the interval time in seconds between instances of the script running.
  • Repeat is the number of times to repeat the running of the script. The value 0 is used to set an infinite number of repetitions.
  • Start can be selected as manual to start the script manually or as auto to start the script automatically.
  • Script is the content of the script.

Communication with the FTP can be checked with a PC:

agonzalez_FD40450_Captura2.JPG

Logs will be seen on the FTP Server.

agonzalez_FD40450_Captura3.JPG

Notes
  • This feature may not be available with all models as a hard drive is necessary.
  • The output overwrites the last file saved so this will work with a single file at a time.
  • If different outputs are to be saved, the recommendation is to create different auto scripts with different intervals.