Skip to main content
papapuff
New Member
May 23, 2025
Solved

Help - how to import url list (locally) into web category

  • May 23, 2025
  • 5 replies
  • 1492 views

hi there,

 

I need to add override url so won't be blocked.

what I understand, there are two way:

1. create custom web category

2. add url on web filter profile

 

am I correct?

there are hundreds url address that I need to add. what is the best practice to add locally, without add manually one by one?

thanks

Best answer by Yurisk

On cli: 

show webfilter ftgd-local-rating

5 replies

sw2090
SuperUser
SuperUser
May 23, 2025

hm I guess that the easiest way would be to write some program that reads your url list and outputs the FOS cli code for creating the rating overrides and then import that as a cli script.

But if anyone kows some better way please go ahead and let us know :)

Yurisk
SuperUser
SuperUser
May 23, 2025

The easiest way would be to actually host your list of URLs in a text file on external web server and then use it as External Feed in Fabric Connectors - those URLs would be automatically imported into Remote Category on Fortigate, which you can then Allow/Except and they will not be blocked.

 

The "local" way is to script on your PC all those URLs into CLI commands to be copy&pasted into Fortigate CLI. The command for each URL would look like:

 

config webfilter ftgd-local-rating     edit "www.example.com"         set rating 140 <-- CUSTOM1 CATEGORY     next end

 This would add "www.examplecom" into Local category you can later Allow/Except from Web filtering. By scripting I mean even Notepad++ using replacement will do the work. 

The 1st option, IMO, is more scalable and is used the most by our clients. 

More info https://yurisk.info/2025/03/13/fortigate-web-filtering-all-you-need-to-know/#_remote_category_filter_for_external_threat_feed 

 

yurisk.info - all things Fortinet blog, no ads
papapuff
papapuffAuthor
New Member
May 26, 2025

hi, thanks for advice.

where i can get the number ID of web rating? since I've created new one

Yurisk
SuperUser
YuriskAnswer
SuperUser
May 26, 2025

On cli: 

show webfilter ftgd-local-rating
yurisk.info - all things Fortinet blog, no ads
papapuff
papapuffAuthor
New Member
May 28, 2025

hi Yurisk, thanks for info.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!