Skip to main content
New Contributor III
August 6, 2007
Question

Import a blacklist

  • August 6, 2007
  • 4 replies
  • 3348 views
What is the easiest way to import a blacklist from a simple text file. Thanks, RushB

    4 replies

    abelio
    SuperUser
    SuperUser
    August 6, 2007
    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)?
    New Contributor III
    August 15, 2007
    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
    SuperUser
    SuperUser
    August 16, 2007
    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,
    New Contributor III
    November 2, 2007
    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 Member
    November 2, 2007
    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.