Skip to content

How to get source and destination for SecurityRule #458

Locked Answered by swaschkut
vinne81 asked this question in Q&A
Discussion options

You must be logged in to vote

You can always think about a PAN-OS XML configuration syntax:

  • address/address-group => addressStore->...

  • service/service-group => serviceStore->...

  • Security Rules ->securityRules->...

But if you think about how AddressObject can be used in a SecurityRule:
$rule->source
$rule->destination

These both of Class AddressContainer, contains references to all used AddressObjects.

Please see below an example.
You can always check the predefined UTIL script how it is done there,
where I like to mention that you should NOT reinvent the wheel and if available using existing Scripts.
pan-os-php type=rule actions=display 'filter=(src has ADROBJNAME)'

pan-os-php type=rule actions=display 'filter…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@vinne81
Comment options

Answer selected by vinne81
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants