1

GUI

APIC > Tenant > common > Security Policies > Filters

enter image description here

I've been trying various commands to get this output via CLI/SSH but didn't work so far.

ACI# show running-config all | grep -nC 3 Filters
ACI#

I also tried to grep Filters from sh run but did not get anything.

What is the right command to get "Security Policies - Filters" via CLI/SSH?

4

From APIC CLI execute next command:

moquery -c vzFilter -x 'query-target-filter=wcard(vzFilter.dn,"TENANT")'

where TENANT is your tenant name. You can also omit whole -x construction to display filters from all tenants in a fabric.

To get filter rules (proto/ports/etc):

moquery -c vzFilter -x 'query-target-filter=wcard(vzFilter.dn,"TENANT")' 'query-target=children' 'target-subtree-class=vzEntry'

But in this case you will see each filter rule separately. You can add more query filters to select exact filter name to see all rules that inside it.

| improve this answer | |
  • 1
    Ok, there is also one addition about filter contents. Give me few minutes to figure out query for it. – Andrey Prokhorov Apr 8 at 13:28

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.