The cheap way to automate Fortinet firewall backups is:
- Enable SSH on the firewall.
- Enable SCP (System -> Admin -> Settings -> Enable SCP)
- Create a ‘backup’ admin user with read_only profile.
- Run a script to scp the configs.
Uses Net::SCP::Expect
#!/usr/bin/perl -w
use warnings;
use Net::SCP::Expect;
@firewallips = ('192.168.1.1',
'192.168.2.1',
'192.168.3.1',
'192.168.4.1',
'192.168.5.1',
'192.168.6.1'
);
foreach $ip (@firewallips) {
print "$ip\n";
my $scpe = Net::SCP::Expect->new(auto_yes=>1);
$scpe->login('backup', 'SUPERSECRET');
$scpe->scp("$ip:sys_config","/home/fortinetbackups/fortinet-$ip\.conf");
}
Or you could do it this way.