Skip to main content
Christian
New Member
October 22, 2013
Solved

Export firewall rules

  • October 22, 2013
  • 3 replies
  • 49788 views
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 ?
    Best answer by TuncayBAS
    Program link http://www.tuncaybas.com/...rtigate-policy-export/

    3 replies

    emnoc
    New Member
    October 23, 2013
    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.
    RH2
    New Member
    October 23, 2013
    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
    TuncayBASAnswer
    Explorer
    September 1, 2016
    Ralph1973
    New Member
    September 9, 2016

    Nice tool Tuncay, thanks.

     

    Ralph