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.
btey
Staff & Editor
Staff & Editor
Article Id 216735
Description This article describes the method of deleting/restoring the IP Geography database.
Scope FortiGate IP Geography database.
Solution

There may be times that the lower-end FortiGate models (which have RAM lesser than 2GB), prompt the error 'Failed to unzip /etc/geoip_db.gz' in the console or during the boot time. The procedure below can be tested to recover the Geo IP database.

 

To delete the existing IP Geography database. This operation will reboot the system.

 

Command to delete IP Geography database:

 

diagnose geoip delete-geoip-db

 

Output:

 

This operation will delete the Geoip Database and reboot the system!
Only super admin has the permission with the command.
Do you want to continue? (y/n)y

Admin:admin
Password:
File /etc/geoip_db.gz deleted successfully.


After rebooting, update to the latest GeoDB version from the FortiGuard server, with the command 'execute update-geo-ip'.

 

If the connection to FortiGuard is unavailable, upgrade the FortiOS firmware after reboot.

 

To verify the status after deleting IP Geography database:

 

diagnose autoupdate versions

 

Looking for the IP Geography database as below. The version will show 0.00000.

 

Output as below:

 

IP Geography DB
---------
Version: 0.00000
Contract Expiry Date: n/a
Last Updated using manual update on Tue Nov 30 00:00:00 1999
Last Update Attempt: n/a
Result: Updates Installed

 

To install the IP Geography database manually:

 

diagnose debug application update -1

diagnose debug enable

diagnose update-geo-ip

 

Output from update debug:

 

do_update[523]-UPDATE successful
upd_cfg_extract_geoip_db_version[594]-version=06004000IPGO00000000000000000000

 

 

To verify the status after updating the IP Geography database:

 

diagnose autoupdate versions

 

Looking for IP Geography database as below. The latest version will be shown.

 

Output as below:

 

IP Geography DB
---------
Version: 3.00132
Contract Expiry Date: n/a
Last Updated using manual update on Tue Jul 5 11:12:05 2022
Last Update Attempt: Tue Jul 5 11:12:05 2022
Result: Updates Installed

 

If the error ('Failed to unzip /etc/geoip_db.gz') persists and the Geo IP database still shows version 0.0.0.0, a TFTP format flash can be done after backing up the config file in the maintenance period. Reload firmware, restore config file, and perform the above steps again: Technical Tip: Formatting and loading FortiGate firmware image using TFTP

 

If the error persists, a ticket can be opened with Fortinet Technical Support for further assistance.