PAN-OS Xpath

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

PAN-OS Xpath

L0 Member

Hi all,

Is it possible to retrieve info for security profiles and policies using XPath on Panorama-managed firewalls?

As of now, I am able to retrieve this info via panorama xml api/xpath, but not through the firewall directly. 
The security policies and profiles can be viewed, directly on the firewall's GUI, but it appears empty when using XPath to retrieve.

These are the Xpaths attempted directly on firewall:

/config/shared/profiles

/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/profiles

1 REPLY 1

Cyber Elite
Cyber Elite

Hi @ahmad_zubayr ,

 

Yes, and no.  The NGFW stores the Panorama-pushed configuration differently than local configuration.  For example, on the NGFW "show rulebase security" in configuration mode will not show the Panorama pushed security policy.  The API is the same.

 

On the CLI, you can use the commands "show config pushed-template" or "show config pushed-shared-policy" to view the Panorama config.  The same commands are available on the API.  I haven't played with it much, but I do not see a way to view only the security policy or specific objects.  You view the entire pushed policy.

 

I would love for someone else to jump in here to show a better way.

 

If you are using the API, you may have the automation tools to pull out the specific pieces you want.

 

Thanks,

 

Tom

Help the community: Like helpful comments and mark solutions.
  • 331 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!