What it generates
- Host
172.16.1.10→set subnet 172.16.1.10 255.255.255.255 - Subnet
10.10.0.0/16→set subnet 10.10.0.0 255.255.0.0(host bits are aligned to the network) - Range
a.b.c.d-e.f.g.h→set type iprangewithstart-ip/end-ip - FQDN
update.example.com→set type fqdn - An
addrgrpcontaining every object, if a group name is set
Naming
Objects are named after their value (N-10.10.0.0_16, H-172.16.1.10), which keeps policies readable and avoids duplicates. Use Name, value to override a single entry. Names are trimmed to the FortiOS limit of 79 characters and duplicates in the input are dropped.
Tips
Review the output before pasting it on a production unit: edit on an existing name modifies that object. On multi-VDOM units set the VDOM field so the script enters the right context. Wildcard FQDNs (*.example.com) are emitted as type fqdn; on recent FortiOS versions you may prefer type wildcard-fqdn instead.