2

I am working with Palo Alto devices. For most devices I worked with, local policies are a part of running configuration so when I am executing cli command "show running config" I get the running configuration and I can find "rulebase" tag inside and local policies are listed under it.

Surprisingly for me, I got one device to work with, which does not have local policies included to the configuration file. I know they are defined on the device and I can get the list of them when I am executing cli command "show running security-policy".

Do you know the reason why I can't see "rulebase" tag and local policies when I am executing "show running config" command on that device? What are the steps to include these policies to the config file? Maybe there is another command to fetch config + policies in the one output?

I would like to add that I need an xml output.

Thank you!

1
  • If your question has been answered sufficiently, please mark the accepted answer so this question doesn't continue to come up as unresolved. Alternatively, you can provide your own answer and mark that.
    – Jesse P.
    Feb 14 at 3:18
2

This article from Palo Alto details how to export a config to an XML file.

Essentially, you just run the command: save config to <xml file name> if you're using the CLI. From there, it's just a matter of downloading the XML file to wherever you want it.

If you'd prefer a GUI method, this article from Palo Alto has better instructions than the previous article (I think).

There appears to be no way to truly export policies, based on the article found here, however they can be viewed in "set" format to make the easily importable by using the following commands:

From the CLI, run the command:

set cli config-output-format set

From the configure mode:

show rulebase security rules 

show rulebase (to view other policies)
2
  • Thanks for your answer Jesse, but the main problem I can't solve is not the formatting output to get xml. I still don't know why policies are not included to the config and how to fix that issue.
    – Verru
    Feb 12 at 16:57
  • @Verru I see. Unfortunately, based on this article, it appears there is no way to truly export the policies. However, you can view them in "set" format so they're easily importable to another unit. I'll edit my answer to include the snippet from this article in case it gets deleted.
    – Jesse P.
    Feb 12 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.