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.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
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.
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.
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.
Hi All,
Thank you to Toshi Esumi, I finally able to correlate the sequence ID and rules position in the config file. It is indeed same in Global View.
Thank you very much.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1713 | |
1093 | |
752 | |
447 | |
231 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.