- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-07-2016 07:36 AM
just in the process of switching to a vulnerability profile which is not shared to vsys specific vulneability profile. Is there an easy way to change a vulnerability profile in 250 security rules without having to manually visist every rule?
06-08-2016 03:48 AM - edited 06-15-2016 03:42 AM
Lets assume your antivirus profile is AV and you want to replace it with Antivirus.
admin@PA-VM> set cli config-output-format set
admin@PA-VM> configure
Entering configuration mode
[edit]
admin@PA-VM# show rulebase security | match AV
set rulebase security rules Test1 profile-setting profiles virus AV
set rulebase security rules Test2 profile-setting profiles virus AV
set rulebase security rules Test3 profile-setting profiles virus AV
set rulebase security rules Test4 profile-setting profiles virus AV
[edit]
admin@PA-VM#
Copy lines that start with "set" to notepad.
Replace all set entries with delete (CTRL+H to open replace window).
delete rulebase security rules Test1 profile-setting profiles virus AV
delete rulebase security rules Test2 profile-setting profiles virus AV
delete rulebase security rules Test3 profile-setting profiles virus AV
delete rulebase security rules Test4 profile-setting profiles virus AV
Paste result into cli window
Now change delete to set again and replace all AV entries with Antivirus.
Paste output back into cli window.
set rulebase security rules Test1 profile-setting profiles virus Antivirus
set rulebase security rules Test2 profile-setting profiles virus Antivirus
set rulebase security rules Test3 profile-setting profiles virus Antivirus
set rulebase security rules Test4 profile-setting profiles virus Antivirus
And commit.
06-07-2016 07:44 AM
Hi clewis,
You could export your configuration then do a find and replace in the XML. Be careful with this though and make sure you take a backup.
For the future you may want to use Security Profile Groups. That way you just modify the profile in the group and it will change the rules that use this group.
hope this helps,
Ben
06-08-2016 03:48 AM - edited 06-15-2016 03:42 AM
Lets assume your antivirus profile is AV and you want to replace it with Antivirus.
admin@PA-VM> set cli config-output-format set
admin@PA-VM> configure
Entering configuration mode
[edit]
admin@PA-VM# show rulebase security | match AV
set rulebase security rules Test1 profile-setting profiles virus AV
set rulebase security rules Test2 profile-setting profiles virus AV
set rulebase security rules Test3 profile-setting profiles virus AV
set rulebase security rules Test4 profile-setting profiles virus AV
[edit]
admin@PA-VM#
Copy lines that start with "set" to notepad.
Replace all set entries with delete (CTRL+H to open replace window).
delete rulebase security rules Test1 profile-setting profiles virus AV
delete rulebase security rules Test2 profile-setting profiles virus AV
delete rulebase security rules Test3 profile-setting profiles virus AV
delete rulebase security rules Test4 profile-setting profiles virus AV
Paste result into cli window
Now change delete to set again and replace all AV entries with Antivirus.
Paste output back into cli window.
set rulebase security rules Test1 profile-setting profiles virus Antivirus
set rulebase security rules Test2 profile-setting profiles virus Antivirus
set rulebase security rules Test3 profile-setting profiles virus Antivirus
set rulebase security rules Test4 profile-setting profiles virus Antivirus
And commit.
06-15-2016 03:55 AM
Thanks Radio, your method seems the easiest.
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!