Is ther any way to change the name of all existing security policies from the cli at once?
Solved! Go to Solution.
I don't think it's possible to edit a rule's name from the CLI; besides, for bulk changes, I'd recommend that you take a look at Palo Alto's 'Expedition' tool. The tool allows for things that you can't do natively on the firewall such as Multi-Edits, Bulk Changes etc.
If you have a list of names (or just pull them from the config in the "set" formatting), you could probably script something out pretty quick with the "rename" statement in the cli.
Example from Panorama:
rename device-group grpGlobal pre-rulebase security rules grpGlobal-BlockKnownMalicious to grpWhateverYouWant
Example directly on Firewall:
rename rulebase security rules toBeChanged to newRuleName
That seems very handy what i need to do is as we have 30 rules say with name
corp_security 2 all the way 30 30
I need to only change the corp to say xyz like
xyz_security 1 and so on
is this possible?
Thanks for the help
The method that @jeremy.larsen described would work perfectly fine for what you need to do. The expedition tool can also do this as @LukeBullimore mentioned but I personally don't really like setting up the tool for something this easy. The CLI method would be fast and easy; you could also export the XML file, make the changes required, and them import and load the configuration back to the firewall.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!
The Live Community thanks you for your participation!