Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
KPetrov
New Contributor

FortiManager Object creation via CLI

I am looking into creation of mass objects in a Fortimanager , it is currently managing two 1500 D's . I know i can create the objects in the firewalls them selves but i could not find a way to import just the objects into the manager. The firewalls have been joined to the manager already.

 

What are the CLI commands of creating objects in the manager ?

 

I use the command below on the firewalls

 

edit host_10.12.170.0

set subnet 10.12.170.0 255.255.255.0 next

 

15 REPLIES 15
HaTiMuX
New Contributor III

Thanks KPetrov for posting the question and thanks GOS for your article.

ck8882
New Contributor II

HI @laf 

 

if there possible also share how to update the per device mapping address object if been enable?

 

Thanks

ck8882
New Contributor II

@laf 

 

If there possible capable FMG update the per device mapping address object. If do, mind to share how is the step?

 

Thanks

ck8882
New Contributor II

Hi @gos 

 

If there possible capable FMG update the per device mapping address object. If do, mind to share how is the step?

 

Thanks

sw2090
Honored Contributor

FMG supports the same CLI as the FMG - depending on the Firmware you have on FMG and FGT.

I did it this way here:

 

take objects from Backup of a FortiGate and put them into FMG as CLI Script. Set the CLI Script to be affecting the ADOM/Policypackage and then ran it once.

I imported e.g. 100s of Web Rating Overrides in this way. 

 

cheers 

Sebastian

-- 

"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams

-- "It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
laf
New Contributor II

Hi guys,

 

I need to add like 30 static routes hence I give it a try for a sample script:

 

config vdom edit root config router static edit 50 set dst 172.31.16.0 255.255.255.0 set device Trt_VPN next end

 

Starting log (Run on database) config vdom edit root > config router static router static [parameter(s) invalid. detail: object unrecognized] Failed to commit to DB, reason(> config router static router static [parameter(s) invalid. detail: object unrecognized] ) Running script(Static routes) on DB failed

----------------End of Log-------------------------

-------Executing time: Sat Jun 24 14:17:19 2017-----------

Starting log (Run on database) config vdom edit root > config router static [parameter(s) invalid. detail: object unrecognized] Failed to commit to DB, reason(> config router static [parameter(s) invalid. detail: object unrecognized] ) Running script(Static routes) on DB failed

----------------End of Log-------------------------

 

The most expensive and scarce resource for man is time, paradoxically, it' s infinite.

The most expensive and scarce resource for man is time, paradoxically, it' s infinite.
Labels
Top Kudoed Authors