Bulk address object creation - either in FortiManager or on the Fortigate then importing
We have about 100 address objects we need to create (this is a recurring thing) and I'm trying to figure out how to do this quickly in bulk.
Now, I know how to bulk-create objects directly in the firewall. I have a script that will spit out text that I can paste into the CLI in the 'Gate that looks like this...
config firewall address
edit 1.1.1.1
set subnet 1.1.1.1 255.255.255.255
next
edit 2.2.2.2
set subnet 2.2.2.2 255.255.255.255
next
edit 3.3.3.3
set subnet 3.3.3.3 255.255.255.255
next
end
That will create three objects the IP address as the object name in my firewall.
What I'm having an issue with is then getting the FortiManager to pull those objects down, and any address groups I've added them to, from the firewall into FMG. I thought the way to do this was to retrieve config but that's not working. The objects never appear in FMG and when I sync it with the Fortigate again, it overwrites what's on the firewall, removing the objects I just created.
So I need to figure out how to either pull these down properly from the firewall or I need to bulk create these in the FortiManager (preferable) and add them to the appropriate groups, then push the config out to all the 'Gates. Anyone know how to do this?