Skip to main content
zsylamm
New Member
September 22, 2022
Question

How to find highest policy id

  • September 22, 2022
  • 5 replies
  • 4363 views

How can I find a highest policy Id used on a vdom firewall policy? As they are not ordered in any particular way

5 replies

kgeorge
Staff
Staff
September 22, 2022

Hello,

 

Greetings!

 

I believe, you would like to know which Policy would be having more weightage. If not, kindly explain your exact requirement.

 

Please be advised that, the Policy ID does not matter however the order does. The Policy on the top of the list take precedence and traffic matches down the list (Top to Bottom).

 

In order to know the Policy ID, you can add the Column called "ID" in Firewall Policy.

 

Have a nice day!

zsylamm
zsylammAuthor
New Member
September 22, 2022

Thanks Klint,

 

I am concerned more about the actual policy ID then about the order. However I am happy to follow some best practices in here. I am automating policy provisioning and I want to make sure that I use a new policy ID that is the highest currently used policyID +1.

The background is that I do have policies configured for given vdom in inconsistent way...

For example just a part of the output from show firewall policy

edit 1445

edit 1446

edit 200201

edit 200202

etc

Now when I create a new policy I want to be able to find the highest used policyID on that device/vdom and add 1 and use it for configuring the policy.

Is there  a way to know the highest used policy ID?

Or maybe another way to handle it?

Maybe I can find in a simpler was the first available policy ID?

 

nilmoe
Visitor III
September 22, 2022

Hi,

 

on the FGT CLI you can create a new policy with the ID "0". This will always use a free ID slot in your policy set.

 

config firewall policy

edit 0

...

 

Hope this helps.

 

Regards

Nils

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!