FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
serge_FTNT
Staff
Staff
Article Id 197902
Description
In the GUI menu Security Profile > Web Filter, if one unticks 'Enable URL Filter' and performs 'Apply', then later on, it is not possible to re-select the URL filter.

This article explains the CLI command to re-install the GUI URL filter.

Example of Customized profile with URL filter
shenry_FD38585_tn_FD38585-1.jpg

GUI after unticking 'Enable URL Filter', the filtered URLs have disappeared
shenry_FD38585_tn_FD38585-2.jpg

Solution
Perform the following commands

config webfilter profile
    edit <web filter profile>   (here above "antivirus+antispam+webfilter+ips")
        config web
            set urlfilter-table 1  <------ this is the trick

CLI Configuration extract

config webfilter urlfilter
    edit 1
        set name "malware"
            config entries
                edit 1
                    set url "sinixer.com"
                    set type regex
                    set action block
                next
                edit 2
                    set url "220.241.35.236"
                    set type regex
                    set action block
                next
                edit 3
                    set url "202.4.250.100"
                    set type regex
                    set action block

config webfilter profile
    edit "antivirus+antispam+webfilter+ips"
        config web
            set urlfilter-table 1

Verification of the restored GUI Configuration

shenry_FD38585_tn_FD38585-3.jpg

Supplemental information when another set of filters exist.

Perform the following command list.

config webfilter urlfilter
    edit 1
        set name "malware-urls"
            config entries
                edit 1
                    set url "sinixer.com"
                    set type regex
                    set action block
                next
                edit 2
                    set url "220.241.35.236"
                    set type regex
                    set action block
                next
                edit 3
                    set url "202.4.250.100"
                    set type regex
                    set action block
                    .
                    .
                    .
    edit 4
        set name "antivirus+antispam+webfilter+ips"
            config entries
                edit 1
                    set url "toto.com"
                next
                edit 2
                    set url "tutu.fr"
                next
            end

config webfilter profile
    edit "antivirus+antispam+webfilter+ips"
        config web
            set urlfilter-table 4  -- select the number matching the url list

One can apply another URL filter #4

shenry_FD38585_tn_FD38585-4.jpg

Contributors