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.
salmas
Staff
Staff
Article Id 310689
Description This article describes how to use a script to import all geography-based address objects and to create an address object group for all the countries. 
Scope FortiGate.
Solution

Check the following steps to create an address object for each geography-based country and to create an address group for all the countries. 

 

To create address objects, download the .zip file named Geography-based address objects.zip attached to this article. 

Upload a script using the GUI:

  • Select the username (Top right corner) and select Configuration -> Scripts.
  • Select 'Run Script'.
  • Select the text file from the downloaded zip and select 'OK'.

Geo_Script.png

Confirm all country address objects are created by navigating to Policy & Objects -> Addresses: Geography.

 

If desired, check and verify the IDs of each country on the text file attached. 

 

diagnose firewall ipgeo country-list

 

To create an address group for all the countries, another script is added to this document named All_countries_address_group_script.zip. Copy and paste this script to the FortiGate CLI.

 

Related document:

Geography based addresses - FortiGate administration guide