Skip to main content
azamwuzere
New Member
July 25, 2016
Question

[SOLVED]Sequence ID information in backup config file

  • July 25, 2016
  • 1 reply
  • 4891 views

Hi All,

 

I'm looking for sequence ID information in backup config file. Reading through the config file, I'm yet to find the sequence ID information, only policy ID. Example as per below:

 

;---snip---

config firewall policy     edit 46         set srcintf "port3"         set dstintf "port1"         set srcaddr "Proxy group"         set dstaddr "all"         set action accept         set status disable         set schedule "always"         set service "HTTP" "HTTPS"         set logtraffic all         set comments "Rules 0006753"         set nat enable     next     edit 39         set srcintf "port3"         set dstintf "port1"         set srcaddr "direct_int" "M_PC"         set dstaddr "all"         set action accept         set schedule "always"         set service "HTTPS" "HTTP" "ALL_ICMP"         set logtraffic all         set nat enable     next

;---snip---

 

As far as I can confirm that the number after edit, e.g  "edit 39", which is 39 is indeed policy id. Is there is any way that I can extract mapped sequence id to policy ID?. I know that I can get this information from web GUI but I'm trying to automate things using CLI.

 

Btw, I'm exporting sys_config file using SCP.

 

Any inputs on this is highly appreciated. Thank you.

1 reply

ede_pfau
SuperUser
SuperUser
July 25, 2016

Well, the sequence ID is not stored anywhere, it's computed/counted when the policy table is displayed. And it doesn't really matter as any operation on policies needs the ID as reference, not the sequence number.

Except for, that the effect of a policy depends on it's place in the sequence.

Intrinsically, the seq. no is given by the sequence of policies in the backup file - the policies are not ordered by ID in the config.

azamwuzere
New Member
July 26, 2016

Hi ede_pfau,

 

Thank you for your reply. So it is confirmed that there are no sequence ID on plain sight in config file. Looking at the sequence of policies in the config file it is also not directly the same with the sequence in web GUI. 

 

However there are some similarities but still I cannot deduct any algorithm or way to extract the information from config file to be as the same as web GUI information.

 

Any thought on this? Or am I missing some crucial information and/or it is technically cannot be done?

 

Thanks in advance.

Toshi_Esumi
SuperUser
SuperUser
July 26, 2016

You're probably watching at Section View in GUI. If you change it to Gobal View, it would match the order in the saved config.