Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Christian
New Contributor

Export firewall rules

I am wondering if there is anyone that knows a good way to export firewalls rules with comments to a readable format ? copying the rulebase from the gui and paste it to excel works but to get the comments you need to copy the rule base from the CLI and then filter and so on which takes time. Checkpoint for example has many good ways to export the rulebase to HTML. Is there any scripts that can read the config file and export id,src int,dst int,src,dst,port and comment ?
1 Solution
TuncayBAS
Contributor II

Program link http://www.tuncaybas.com/...rtigate-policy-export/
Tuncay BAS
RZK Muhendislik Turkey
FCA,FCP,FCF,FCSS

View solution in original post

Tuncay BASRZK Muhendislik TurkeyFCA,FCP,FCF,FCSS
4 REPLIES 4
emnoc
Esteemed Contributor III

You can review any firewpolicies and ordering via the " show firewall policy" commands. You can copy these down a build a script that parser the field you want , bu t I don' t know of any one tool that' s provide by fortinet. You need to get creative.

PCNSE 

NSE 

StrongSwan  

PCNSE NSE StrongSwan
RH2
New Contributor II

the fortimanager has an export to csv option, but the fortigates do not. I usually end up copying the rules from the CLI and open with MSWord. Then do some creative search and replace to put each policy on one line seperated by tabs. Then I can import that into excel. time consuming and sucks
TuncayBAS
Contributor II

Program link http://www.tuncaybas.com/...rtigate-policy-export/
Tuncay BAS
RZK Muhendislik Turkey
FCA,FCP,FCF,FCSS
Tuncay BASRZK Muhendislik TurkeyFCA,FCP,FCF,FCSS
Ralph1973

Nice tool Tuncay, thanks.

 

Ralph

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors