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.
akumarr
Staff
Staff
Article Id 191392

Description

 

This article describes how to restore config file from CLI by using the TFTP server.

 

Consider backing up the current configuration (using the GUI or CLI commands below) before starting to restore the config file in question, so that the admin can revert to the current status if needed.

 

execute backup config

execute backup ipsuserdefsig

 

The first command backs up the configuration and the second one backs up the IPS custom signatures, if any.

 

Scope

 

FortiGate.


Solution


On the PC connected to FortiGate, set up the TFTP server by downloading the preferred TFTP server application. In this example, TFTPD64 is used: 
TFTPD64 Download Page 

Once installed, place the backup config on the 'Current Directory'. Verify it by selecting 'Show Dir'. Next, choose the correct NIC that connects to the FortiGate for 'Server interfaces':

TFTPD64.png
Verify further by pinging the FortiGate and check by using the sniffer: 

Screenshot 2024-06-05 104618.png

 

Screenshot 2024-06-05 104624.png
Commands for restoring the config from TFTP are mentioned below.

 

execute restore config tftp {string} {Tftp server} {passwd}

{string}                                <- Configure file name (path) on the remote server.

{Tftp server}                        <- TFTP server IP.

{passwd}                                <- TFTP server password.        

                                                                                                                                            

 Find the following example in the CLI:

 

execute restore config tftp test.conf 10.82.2.2
This operation will overwrite the current setting and could possibly reboot the system!
Do you want to continue? (y/n)y

Please wait...
Connect to TFTP server 10.82.2.2 ...

Get file from TFTP server OK.
File check OK.

 

test.conf is the config file name, 10.82.2.2 is the IP address of TFTP server which is the PC that connects to FortiGate.