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

Scripting Services into Policy Package

 

I need to know the script syntax for pushing custom service objects via a Fortimanager script and onto the Policy Package on Fortimanager.

 

I am able to use scripting in to push address objects into the ADOM Policy Package databases in Fortimanger, but when I mirror what I am doing to push these objects for services, the script errors out.

 

Address object script example(this works):

 

config firewall address edit sample.object.name set subnet 10.10.10.10/255.255.255.255 set comment 'sample address object' next end

 

Note how the script is different than the actual firewall config in the use of double and single quotes, but is otherwise the same.  The above script is complete and works to push the address object on the Policy Package.  But when I try every similar variation of script format to configure custom services, the script fails to execute.

 

I suppose I could use the exact service object config and push the customer services directly to the ADOM, and then do a retrieve, but that seems like a kludge.  

 

I need to keep a single set of address objects, custom services, and groups for 24 vdoms in Fortimanager, but only apply those in use on each firewall ADOM.

 

I did search for an answer, but Google, A forum search, and Fortinet's documentation has failed me.

 

Thanks,

 

1 REPLY 1
scao_FTNT
Staff
Staff

what is the ADOM version?  I tried a simple one in 5.2 ADOM on FMG 5.2.4 738 and run script is OK

 

config firewall service custom     edit "tcpc111"         set color 1         set visibility disable         set fqdn "8001"         set tcp-portrange 8001         set comment "for testing"     next end

 

Thanks

Simon

Labels
Top Kudoed Authors