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

Import a blacklist

What is the easiest way to import a blacklist from a simple text file. Thanks, RushB
5 REPLIES 5
abelio
SuperUser
SuperUser

It depends on the meaning of ' easiest' : import bulk CLI commands (System->Maintenance->Advanced menu) is a nice and powerful tool if you feel yourself comfortable with CLI.. Could you post what' s exactly you need to solve (list type, firmware version, etc)?

regards




/ Abel

regards / Abel
Not applicable

I' m running Fortigate-300 3.00-b0559(MR5) I don' t want to cut off gaming in the url filter, because it will catch educational games as well. So I want to take the gaming category list from: http://urlblacklist.com/?sec=download And bulk import the list into my url filter. Any guidance on how to do this easily would be appreciated. Thanks, RushB
abelio

A starting point: the structure of WF urlfilter list is something like:
 config webfilter urlfilter
     edit 1
             config entries
                 edit " URL1" 
                     set action block
                     set status enable
                     set type simple
                 next
                 edit " URL2" 
                     set action block
                     set status enable
                     set type simple
                 next
             end
         set name " gaming" 
     next
 end
 
You' ll need a script (perl, ruby, shell, python, whatever) able to parse your downloaded blacklist and replace each $URLx variable with one url from that blacklist. After finished the loop, the script output to a plain text file. You' ll can import it as Bulk CLI commands (menu System->Maintenance->Backup&Restore->Advanced Urlblacklist.com ' s lists are long, consider that when you choose your lists to import. Each FTG-model has a limit of entries for lists; check it against this KC' s article: http://kc.forticare.com/default.asp?id=2067&SID=&Lang=1 hope it helps,

regards




/ Abel

regards / Abel
Not applicable

Has anyone done this yet? I hate to reinvent the wheel. This really should be a feature in the software, the ability to import a file of url' s into anything in the system No way to import list of spammers, exempt urls, block urls, bad words - come on, this should be something simple to code where we just send up a file in the right format and it gets added in. Anyone from Fortinet got an answer? Later, RushB
doshbass
New Contributor III

The correct format is CLI format as per Abel' s message. and the upload utility is via the bulk upload on the maintenance page. Providied you can create the correct CLI format you can ndo whatever you like.
Still learning to type " the"
Still learning to type " the"
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