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.
Nivedha
Staff
Staff
Article Id 425472
Description This article describes how to block YouTube Shorts while allowing access to normal YouTube videos on FortiGate. It provides a step-by-step guide to configuring the necessary settings to achieve this.
Scope FortiGate.
Solution

To block YouTube Shorts on FortiGate, follow these steps:

Go to Security Profile -> Webfilter -> Static URL filter -> URL Filter and create a new URL filter.

In the URL filter, add the following URL: youtube.com/shorts/ and set the action to block.

 

URLfilter.png

 

Go to Policy & Objects -> Policy -> IPv4 and create a new policy or edit an existing one.

In the policy, add the Web Filter profile created in step 1 and set the action to block.

CLI method:

 

config webfilter profile

    edit "block-shorts" ----> Create or edit a web filter profile (choose a name or use an existing one).

        config ftgd-wf unset options 

            config web

                set urlfilter-table 1    ---> We'll use table ID 1 for the URL filter.

            end

            config urlfilter

                edit 1 

                    config entries

                        edit 1

                            set url "youtube.com/shorts"

                            set type wildcard

                            set action block

                            set status enable

                        next

                    end

                next

            end

 

Apply it to a policy: 

 

config firewall policy

    edit <policy id>

        set webfilter-profile "block-shorts"   <----- Add the webfilter profile created previously.

    next

end

 

Alternatively, it is possible to use Application Control to block YouTube Shorts. Go to Security Profile -> Application Control -> Application and Filter overrides and create a new application control policy.

In the application control policy, add the YouTube Shorts application and set the action to block.

 

app override.png

 

Go to Policy & Objects -> Policy -> IPv4 and create a new policy or edit an existing one.

In the policy, add the application control policy created in step 5 and set the action to block.

 

CLI method:

 

config application list
    edit "block-youtube-shorts"
        config entries
            edit 1
                set application "YouTube.Shorts" <----- Or the exact signature ID/name.
                set action block
            next
        end
    next
end


Apply to policy:


config firewall policy

    edit <policy id>
        set application-list "block-youtube-shorts"
        set ssl-ssh-profile "deep-inspection" <----- Required for encrypted traffic.
    next
end

 

Make sure to apply the changes and test the configuration to ensure that YouTube Shorts are blocked while normal YouTube videos are allowed.