hello and sorry for my english,
I want in CLI mode delete all addresses objects that begin with particular name : 'Block-IP'
I know i can delete objects in config firewall address but how to do mass deletion with begin name ?
it is in config firewall address
thanks a lot
hi,
i dont think it's possible to do so in a mass way, meaning deleting all objects starting with Block-IP*, rather deleting them 1 by 1 .
from the GUI on the other hand you could do so by filtering the objects and then multiple selection.
i don't want to do it in GUI but only in CLI script because it will be script in automation use every week
if you script it, then do a show firewall address | grep Block-IP and then line by line do a delete of the object name found with it.
Ok, this commande works : show firewall address | grep Block-IP
but after how to delete line by line in CLI ?
after you get all the objects containing that string, e.g. Block-IP-1.1.1.1 , Block-IP-2.2.2.2 you would need to parse the output and for each line/object do a delete <> under config firewall address
i understand this but how to store data of show firewall address | grep Block-IP command before send to delete command ?
you save the output of the command in a list and then parse it line by line.
that's how i would do it.
User | Count |
---|---|
2549 | |
1356 | |
795 | |
646 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.