Skip to main content
memoarp
New Member
May 2, 2016
Solved

Unable to create CUSTOM CATEGORIES on Web Rating Overrides

  • May 2, 2016
  • 1 reply
  • 28810 views

I use a Fortigate  100D with OS  5.4

 

I'm trying to create a new Custom Category on the Web Rating Overrides, only two default categories appear (Custom 1 and Custom 2) and there is no way to create another. According to the documentation (Security Profiles for FortiOS 5.4 Page 77), there should be a button labeled as Create New, but as you can see, there isn't any on my interface :( 

 

Is there any other way to create and configure a Custom Category for Web Rating Overrides?

 

    Best answer by tanr

    This page of the docs describes this (kind of):

     

    Overriding FortiGuard website categorization

     

    However (as you've seen) there doesn't appear to be a "Create New" button on the Custom Category GUI page, as the instructions say.  You can do it from the CLI though.  (Warning: if you're not familiar with the CLI, make a backup copy of your config first, and read up on the basics of the CLI layout and using config, show, edit, set, end, abort, etc.)

     

    To add or edit the local/custom categories from the CLI, type:

      config webfilter ftgd-local-cat

     

    From here, you can type "show" to see that ftgd-local-cat has two entries by default, which are named custom1 and custom2.  

     

    To rename an existing custom/local category, like "custom1", from the CLI (within the config webfilter ftgd-local-cat) type:

      rename custom1 to MyCustomName

     

    To add a new custom category, edit a name that has not yet been used from the CLI:

      edit MyNewCustomName

     

    This will add a new custom name field with that name and a newly generated id.

    To save all this, remember to enter "end" in the CLI.

     

    After creating/editing the custom/local categories in the CLI, you can use them in the GUI.

     

     

    In the GUI, go to Security Profiles > Web Rating Overrides, and choose "Create New".  Type in the URL pattern you want to match, for Category, choose "Custom" from the dropdown, then from the Sub-Category drop-down, choose whichever one of your new custom categories you want.

     

    1 reply

    trubble
    New Member
    May 20, 2016

    I don't believe there is any way to do this from the web GUI.  You can add new custom categories via the CLI:

     

    #config webfilter ftgd-local-cat

    (ftgd-local-cat) # edit MyCustomCategory

    new entry 'MyCustomCategory' added

    (MyCustomCategory)#

    memoarp
    memoarpAuthor
    New Member
    May 20, 2016

    trubble wrote:

    I don't believe there is any way to do this from the web GUI.  You can add new custom categories via the CLI:

     

    [style="background-color: #ffff99;"]#config webfilter [style="background-color: #00ff00;"]ftgd-local-cat[/style][/style]

    [style="background-color: #ffff99;"](ftgd-local-cat) # edit MyCustomCategory[/style]

    [style="background-color: #ffff99;"]new entry 'MyCustomCategory' added[/style]

    [style="background-color: #ffff99;"](MyCustomCategory)#[/style]

    Thanks for your answear mate :)     What does "ftgd-local-cat" mean? 

     

    From the CLI, should I write the commands line by line?  for example

    FG123456 $ #config webfilter fgd-local-cat  

    tanr
    tanrAnswer
    New Member
    May 20, 2016

    This page of the docs describes this (kind of):

     

    Overriding FortiGuard website categorization

     

    However (as you've seen) there doesn't appear to be a "Create New" button on the Custom Category GUI page, as the instructions say.  You can do it from the CLI though.  (Warning: if you're not familiar with the CLI, make a backup copy of your config first, and read up on the basics of the CLI layout and using config, show, edit, set, end, abort, etc.)

     

    To add or edit the local/custom categories from the CLI, type:

      config webfilter ftgd-local-cat

     

    From here, you can type "show" to see that ftgd-local-cat has two entries by default, which are named custom1 and custom2.  

     

    To rename an existing custom/local category, like "custom1", from the CLI (within the config webfilter ftgd-local-cat) type:

      rename custom1 to MyCustomName

     

    To add a new custom category, edit a name that has not yet been used from the CLI:

      edit MyNewCustomName

     

    This will add a new custom name field with that name and a newly generated id.

    To save all this, remember to enter "end" in the CLI.

     

    After creating/editing the custom/local categories in the CLI, you can use them in the GUI.

     

     

    In the GUI, go to Security Profiles > Web Rating Overrides, and choose "Create New".  Type in the URL pattern you want to match, for Category, choose "Custom" from the dropdown, then from the Sub-Category drop-down, choose whichever one of your new custom categories you want.