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

Export Fortigate 300d Rules

Hello Guys ,

I need someone show me how can i do Export rules from Fortigate 300d to Excel Sheet  .We dont have a Fortimanager to do this export .

Any idea please ?

 

Regards

1 Solution
TuncayBAS

Full Config Export. One or multi device export

 

http://www.tuncaybas.com/...ortigate-policy-export

Tuncay BAS RZK Muhendislik Turkey NSE 4 5 6 FCESP v5

View solution in original post

Tuncay BAS RZK Muhendislik Turkey NSE 4 5 6 FCESP v5
25 REPLIES 25
ahmedsf
New Contributor

Hi,

 

Use the CLI, run the configuration, copy the configuration and paste it in notepad. You can then take out the rules from the configuration and save it in Excel sheet.

 

Regards,

Elthon_Abreu

Try this: http://firewallguru.blogs...-rules-to-csv.html?m=1

Elthon Abreu FCNSA v5

Elthon Abreu FCNSA v5
Nicholas_Doropoulos

Hi,

 

Unfortunately, Fortinet has not made available a way to achieve the intended result seamlessly as of yet. What you can do is the following:

 

1) Open an ssh session to the Fortigate via Putty and enable logging of the session's output by following the kb article below:

 

http://kb.fortinet.com/kb/documentLink.do?externalID=FD36043

 

2) The, type the following commands:

 

config firewall policy 

show

 

3) Your firewall policies should now be included in the session's log you have created in step 1. Copy and paste the contents onto a spreadsheet.

 

Thanks.

NSE5, CCSE, CCNA R&S, CompTIA A+, CompTIA Network+, CompTIA Security+, MTA Security, ITIL v3

NSE5, CCSE, CCNA R&S, CompTIA A+, CompTIA Network+, CompTIA Security+, MTA Security, ITIL v3
scb

What version of FortiOS does that work for?  I'm trying on a 600C with 5.0 firmware and it doesn't recognize that command. I'm just trying to get to a point I can export the firewall rules for one of our customer VDOMs, and it seems like this is quantum physics.

Azuriste

Hello ,

Thanks to All .

I tried the Script http://firewallguru.blogs...-rules-to-csv.html?m=1 but it's not supporting  if i have a huge rules data  .it was working for the few entries but in my case i have more than 1500 rules .

 

Any Help please ?

 

Regards

Elthon_Abreu

Hi,

 

Have you thought about segmenting your rules in small blocks at a time?

 

Then you can export all rules to excel and merge all of them.

 

BR,

Elthon Abreu FCNSA v5

Elthon Abreu FCNSA v5
Azuriste

I can do this but i manage many firewalls .So i'm looking for an express procedure :)

 

Thanks

Elthon_Abreu

Express procedure = FortiManager  :)

Elthon Abreu FCNSA v5

Elthon Abreu FCNSA v5
Dave_Hall

If you plan to use that perl script - keep in mind that you can save an unencrypted fgt configuration file then open it in a text/word processor that understands unix/linux line feed only text files.  After this, just look for the firewall policy rule section and copy/paste that into smaller chucks that can be properly parsed by that perl script.

 

Edit: is there some grand design that you need to have the firewall rules parsed/converted?

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C
Labels
Top Kudoed Authors