- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-11-2019 02:10 PM
Is ther any way to change the name of all existing security policies from the cli at once?
04-12-2019 02:15 PM
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
04-14-2019 05:58 PM
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.
04-12-2019 06:45 AM - edited 04-12-2019 06:45 AM
Hey @MP18
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.
https://www.paloaltonetworks.com/products/secure-the-network/next-generation-firewall/migration-tool
Cheers,
Luke.
04-12-2019 02:15 PM
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
04-12-2019 05:02 PM
That seems very handy what i need to do is as we have 30 rules say with name
corp_security 1
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
04-14-2019 05:58 PM
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.
04-14-2019 07:25 PM
Many thanks for replying to the Question.
It is good to have confirmation from you.
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 LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!