Is there any other way to configure Log forwarding profile in all 300+ security policies in single shot.
currently there is no log forwarding profile in all 300+ policies.
So below method is not applicable:
Not through web interface but you can export config out.
It is one single xml file.
Device > Setup > Operations > Export configuration version
Pick latest one from dropdown and click ok.
Then open this xml in your favourite text editor.
Find area between:
Everywhere you see "</entry>" and log-setting config does not precede:
Then replace this with:
Solved! Go to Solution.
Is there a specific reason why you can't export the XML and modify it manually? That would be a fairly logical conclussion for what you are looking to do, and would honestly take the least amount of time. This is something you could script, but you would need to collect all of the security policy names to actually write that script.
@Javith_Ali it's now up to you which way to go...
This link might give you some hints.
In your case you need to get list of rules like @vsys_remo menioned and go from there.
Another option would be to dump config in "set format" to see the actual cli command. I suggest adding the log forward option to at least 1 policy so you have a reference cli command. Then you can sve this as a csv file. Then sort the relevant data and delete everything else. Then add the missing syntax. Then convert the csv back to text and paste as cli. But PAN script mode gets flaky if you paste more than 50 lines at a time. I wish they would fix that. This is why they like to merge portions of the xml file because script mode is unreliable for large pastes.
Haven't seen this answer yet so needed to reply..
Migration Tool!!! (or Expedition as it's called now)
This is one of the best things about the tool - batch rule changes.
Setting Security Profiles on all rules, Log Forwarding, etc
Connect the FW (or Panorama) to the Migration Tool, ingest policies, multi-rule edit, then API push the rules back to Firewall.
the pan-c tool will also allow you to do this.
Use the rules-edit function to update all your rules with the new log profile.
FYI, if you name the profile "default" all new security rules will apply the profile automatically. Same goes for security profile groups
For big pastes to CLI, use a terminal emmulator, like Secure CRT, that allows you to add a 'pause' between lines. I've used a pause of 50ms to paste several hundred lines at a time.
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!