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.
bkarl
Staff
Staff
Article Id 242501
Description This article describes how to back up FortiOS & YAML format configuration files using TFTP service as a TFTP server on Linux Mint 21.1 Vera.
Scope FortiGate version 7.2.3 or earlier.
Solution
  1. On Linux Mint, open a terminal tab and enter the following command:

sudo apt update

 

bkarl_0-1673364145122.png

 

  1. Install TFTP service:

sudo apt install tftpd-hpa

 

bkarl_1-1673364177145.png

 

  1. Verify that the TFTP services are already running:

sudo systemctl status tftpd-hpa

 

bkarl_2-1673364391579.png

 

  1. Once the last step is done, it will be possible to configure the TFTP file of the service.

Access the file and edit it:

 

sudo nano /etc/default/tftpd-hpa

 

Change the TFTP directory path and TFTP options only:

 

Before:

 

TFTP_DIRECTORY=”/var/lib/tftpboot”

TFTP_OPTIONS=”—secure”

 

After:

 

bkarl_3-1673364427448.png

 

It will then be possible to save the changes made before by pressing Ctrl + O, then S, then Ctrl + X (to exit).

 

  1. It is now necessary to create a new folder in order to match the path configured before.

sudo mkdir /tftp

sudo chown tftp:tftp /tftp   <----- This command changes the ownership of the folder.

 

bkarl_4-1673364527130.png

 

  1. Restart the service and check that it is running properly.

 

sudo systemctl restart tftpd-hpa

sudo systemctl status tftpd-hpa

 

Now go to FortiGate-VM 64 (in this case FortiOS 7.2.3 build 1262 is used).

 

As an example:

 

execute backup yaml-config tftp backup_test_yaml.conf 10.124.100.12

execute backup config tftp backup_test_FortiOS.conf 10.124.100.12

 

bkarl_5-1673364527133.png

 

YAML:

 

bkarl_6-1673364527135.png

 

FortiOS:

 

bkarl_7-1673364527137.png

 

Notes:

Consider that the TFTP Server should be reachable by FortiGate.

For more details, see Configuration backups - FortiGate 7.2.3 administration guide.