Search Posts

FortiGate / FortiManager TCL script example

Creating 150 address with a TCL-script

#!
proc do_cmd {cmd} {
puts [exec "$cmd\n" "# " 15]
}

set numhosts 150
do_cmd "config firewall address"
for {set i 12} {$i <= $numhosts} {incr i} {
do_cmd "edit host-$i"
do_cmd "set subnet 192.168.21.$i/32"
do_cmd "next"
}
do_cmd "end"