• Fortinet
  • Fortigate Firmware Upgrade: Dangers & Tips

Fortigate Firmware Upgrade: Dangers & Tips


New Firmware Releases

As we know, network equipment vendors periodically release new software which should fix the issues from the previous release. Still, it’s no secret that, sometimes, new firmware can fix one thing while also breaking two more in the process.
Therefore, if a new firmware release promises a fix for periodic issues with your site-to-site VPN, which is very important for your business since it transports encrypted data between your offices, you should reconsider upgrading your firmware and testing if it fixed your VPN issues.
However, if the greatest benefit from the firmware upgrade is an obscure issue in your FortiGuard Application Control where ‘block-page-status-code’ doesn’t work for HTTP status code of DLP replacement messages, maybe you should reconsider upgrading.
In this article, we will go through potential dangers and things to think about prior to the upgrade attempt. Then we will go through the needed commands.

It’s Just A Firmware Upgrade…

‘Well, it’s only a firmware upgrade.’
How many times did you cringe when somebody told you ‘But it’s just to install a certificate, right?’ Seems the words just and only are frequently used by people in the industry, but you should be aware that “just that” usually means “only a few more” things to do.
And while the process is indeed relatively straight-forward, as mentioned, it can lead to new issues (perhaps much worse than the issues you got resolved).
That’s why you should chose to upgrade only if it’s necessary and you can see the benefit. The best option is obviously testing this in the lab. That way, you can also get some hands-on experience of the whole procedure.

Upgrade Preparations

Let’s cover the things you need to think about before upgrading your firewall.
Install a TFTP server and ping it from the firewall to ensure connectivity.
Obviously, you need to download the firmware image for your FortiGate model. Then, download the release you are currently using, to be able to downgrade if things go bad.
After that, another obvious thing, which, if overlooked, can lead to very serious issues – backup your configuration.
You can use these commands:

execute backup config
execute backup ipsuserdefsig

The first command will back-up your configuration and the second one will back-up your IPS custom signatures, if any.

Console Cable

Console cable requires its own section because I can’t stress how important is to have these few wires. For experienced engineers, it’s an obvious thing to have a console cable ready, but for the rest of you out there, maybe not.
And why do we need a console cable?
To prepare yourself for the possible nightmare situation.

Nightmare Situation

Obviously, the worst thing that can happen after firmware upgrade is the total crash of your firewall.
Picture this situation.
You are upgrading your firmware on Friday, after business hours. You want to be ready for the possible issues and you want to have time over the weekend to fix it before people start working on Monday. Smart idea, right? It is, but you simply overlooked the console cable.
After you finished your firmware upgrade and rebooted the firewall, the GUI won’t start. Your Fortigate crashed, and you now have no internet.
You frantically call FortiGate support and they tell you will have to connect your computer to the FortiGate using the console cable, reset the device to factory settings, upgrade to the firware version you were using prior to the software upgrade attempt and load your saved configuration file from TFTP server.
You now understand that you can’t really do anything of the recommended procedures since it’s already late.
In the morning, you are trying to buy a console cable, but in your small town there is no IT shop that sells it (yes, it’s possible). Then you must drive for 200 miles to meet the cousin’s cousin who has the needed rolled over cable with the serial adapter for the PC.
Sounds bad, right?
That’s why my advice is to make sure to have that console cable, just in case.

Upgrade Procedure

Let’s get to the configuration, shall we?
First, try to ping your TFTP server.

execute ping 192.168.10.10

Then copy your new firmware image to your TFTP server.

execute restore image tftp FortiGateImage.out 192.168.10.10

After you issue the command, the FortiGate will warn you:

This operation will replace the current firmware version!
Do you want to continue? (y/n)

Type “Y” to continue.
After the firewall installs the software, it will reboot.
After you reconnect to the CLI, update your antivirus definitions.

Execute update-now

That’s about it. Your new firmware is installed and now you just need to check if there are any bugs.

Testing The Firmware

Fortunately, there is a way to test the new firmware before applying it for good.
You can load the new firmware image and save it to the FortiGate’s memory. After upgrading the firmware, the firewall will use the new software only until the next reboot. If there are no bugs and you decide you are good to go, you can permanently install the image.
So, let’s go through the process.
First, connect to the firewall using the aforementioned console cable and make sure you can ping your TFTP server. Then, reboot the firewall. While it reboots along the way it will display this line:

Press any key to display configuration menu....

Be careful here since you have three seconds to do this. If you miss it, you must reboot it again.
If you stopped it properly, you will see this message:

 [G]: Get firmware image from TFTP server.
 [F]: Format boot device.
 [B]: Boot with backup firmware and set as default
 [C]: Configuration and information
 [Q]: Quit menu and continue to boot with default firmware.

 [H]: Display this list of options.
 Enter G, F, Q, or H:

Press “G” and, when prompted, type in the IP address of your TFTP server. Then insert the IP address of your firewall’s LAN.
FortiGate will now ask for the name of your firmware image. The firewall will then upload the file and display the following message:

Save as Default firmware/Backup firmware/Run image without saving: [D/B/R]

Chose “R”. The FortiGate will continue with the upgrade procedure.
Now you have time to test if everything is working properly. If you find issues, just reboot the firewall and it will revert to the old firmware. If there are no issues, repeat the procedure and chose “D” this time or reboot the firewall and do the already described normal procedure.
Hope this was informative and will save you some troubles.

Check out our top automation elements that can help you prevent costly disruptions. Thank you to Filip Knezevic for his contribution to our blog.

BlueCat to acquire LiveAction

BlueCat adds LiveAction’s network observability and intelligence platform, which helps large enterprises optimize the performance, resiliency, and security of their networks.