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

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

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

2 Solutions
Yurisk
SuperUser
SuperUser

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... 

 

https://yurisk.info

View solution in original post

https://yurisk.info
Yurisk

On cli: 

show webfilter ftgd-local-rating
https://yurisk.info

View solution in original post

https://yurisk.info
5 REPLIES 5
sw2090
SuperUser
SuperUser

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 :)

-- 

"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams

-- "It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
Yurisk
SuperUser
SuperUser

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... 

 

https://yurisk.info
https://yurisk.info
papapuff
New Contributor II

hi, thanks for advice.

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

Yurisk

On cli: 

show webfilter ftgd-local-rating
https://yurisk.info
https://yurisk.info
papapuff
New Contributor II

hi Yurisk, thanks for info.

Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors