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.
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.
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).
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.