FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
jasonhong
Staff
Staff
Article Id 208621

Description

 

This article describes how to create firewall objects in FortiManager ADOM database with scripts. For this demonstration, firewall address will be created .

 

Solution

 

1) Enable scripts under FortiManager admin settings (System Settings -> Admin -> Admin Settings -> Display Options on GUI, enable 'Show Scripts' and save the change.

 

adminsettings_showscript.png

 

2) Create a new script and set the script to run on Policy Package or ADOM database (Device Manager -> Script, select 'Create New Script').

 

The script details are similar to the FortiOS CLI syntax/command in which the user can enter on the local FortiGate.

User is advised to be familiar with FortiOS CLI syntax/command.

 

When creating a script that is set to run on the FortiManager ADOM Database, there is no need to specify the VDOM within the script details, e.g. # config vdom.

 

testscript.png

 

Sample script:

 

# config firewall addres

    edit ” test-address-1″

        set subnet 10.1.1.1 255.255.255.0

        set color 1

    next

        edit “test-address-2”

            set subnet 10.2.2.2 255.255.255.0

            set associated-interface “port2”

        next

    end

 

3) Once the script is created, run the script against the default value and the firewall objects will be created accordingly under Policy & Objects -> Object Configurations -> Firewall Objects -> Addresses).

 

runscript.png

 

createdaddress.png

Contributors