How to Block YouTube and other Media Websites using App Rules (Blocking DNS Queries)
12/01/2023 1,143 People found this article helpful 492,101 Views
Description
How to Block YouTube and other Media Websites using App Rules (Blocking DNS Queries)
Resolution
Feature/Application
This article describes how to block YouTube videos using App Rules. This is accomplished by blocking the DNS Queries for googlevideo.com, which will not only block videos directly on YouTube but also linked YouTube videos on sites like Facebook. Similar blocks can be setup for other Domains by following this article and substituting any Domain you wish.
Note
1. This solution blocks DNS Requests and Responses only. If a video is paused before enabling this rule, it will be able to resume play. However, when attempting to play a new video, it will be blocked. Likewise, when switching from an "outside" wireless network, where this rule is not enforced, to a network behind the SonicWall with this rule enabled, new videos will be blocked though paused / ongoing videos will play.
2. The solution described here will impact other applications which depend on the Google Video server to play videos. For example, YouTube videos linked through Facebook.
Resolution for SonicOS 7.X
This release includes significant user interface changes and many new features that are different from the SonicOS 6.5 and earlier firmware. The below resolution is for customers using SonicOS 7.X firmware.
Procedure
1. Login to the SonicWall Management GUI.
2. Navigate to Object>Match Object>Match Object and click on Add > Match Object to open the Add/Edit Match Object window.
3. Enter a name for this object under Object Name and set Match Object Type to Custom Object.
4. Set Input Representation to Alphanumeric and under Content input googlevideo.com. Click Add.
5. Click OK.
6. Navigate to Policy > Rules and Policies > App rules and click on the Add New Policy button to open the Edit App Control Policy window.
Enter the following: Policy Name, Policy Type (Custom Policy), Match Object (the Match Object we created above), Action Object (Reset/Drop). You can also set Exclusions,Inclusions, Schedules, and more if required for your individual setup.
7. Click OK and ensure that the checkbox for Enable App Rules is checked, as well as the Policy you just configured being Enabled.
Note: You could lock it down further by Zone. For example,
- Set Connection Side to Server Side or Both.
- Click on Advanced under Direction.
- Set the From and To fields as necessary.
Testing
From a device behind the SonicWall, try to play a video in the YouTube application or on the YouTube website after flushing the DNS cache of the device.
Resolution for SonicOS 6.5
This release includes significant user interface changes and many new features that are different from the SonicOS 6.2 and earlier firmware. The below resolution is for customers using SonicOS 6.5 firmware.
Procedure
1. Login to the SonicWall Management GUI.
2. Navigate to MAnge > Policies > Objects > Match Objects and click on Add > Match Object to open the Add/Edit Match Object window.
3. Enter a name for this object under Object Name and set Match Object Type to Custom Object.
4. Set Input Representation to Alphanumeric and under Content input googlevideo.com. Click Add.
5. Click OK.
6. Navigate to Manage > Policies > Application Control and click on the Add New Policy button to open the Edit App Control Policy window.
Enter the following: Policy Name, Policy Type (Custom Policy), Match Object (the Match Object we created above), Action Object (Reset/Drop). You can also set Exclusions, Inclusions, Schedules, and more if required for your individual setup.
7. Click OK and ensure that the checkbox for Enable App Rules is checked, as well as the Policy you just configured being Enabled.
Note: You could lock it down further by Zone. For example,
- Set Connection Side to Server Side or Both.
- Click on Advanced under Direction.
- Set the From and To fields as necessary.
Testing
From a device behind the SonicWall, try to play a video in the YouTube application or on the YouTube website after flushing the DNS cache of the device.
Resolution for SonicOS 6.2 and Below
The below resolution is for customers using SonicOS 6.2 and earlier firmware. For firewalls that are generation 6 and newer we suggest to upgrade to the latest general release of SonicOS 6.5 firmware.
Feature/Application
This article describes how to block YouTube videos using App Rules. This is accomplished by blocking the DNS Queries for googlevideo.com, which will not only block videos directly on YouTube but also linked YouTube videos on sites like Facebook. Similar blocks can be setup for other Domains by following this article and substituting any Domain you wish.
Note
1. This solution blocks DNS Requests and Responses only. If a video is paused before enabling this rule, it will be able to resume play. However, when attempting to play a new video, it will be blocked. Likewise, when switching from an "outside" wireless network, where this rule is not enforced, to a network behind the SonicWall with this rule enabled, new videos will be blocked though paused / ongoing videos will play.
2. The solution described here will impact other applications which depend on the Google Video server to play videos. For example, YouTube videos linked through Facebook.
Procedure
1. Login to the SonicWall Management GUI.
2. Navigate to Firewall | Match Objects and click on Add New Match Object to open the Add/Edit Match Object window.
3. Enter a name for this object under Object Name and set Match Object Type to Custom Object.
4. Set Input Representation to Alphanumeric and under Content input googlevideo.com. Click Add.
5. Click OK.
6. Navigate to Firewall | App Rules and click on the Add New Policy button to open the Edit App Control Policy window.
Enter the following: Policy Name, Policy Type (Custom Policy), Match Object (the Match Object we created above), Action Object (Reset/Drop). You can also set Exclusions, Inclusions, Schedules, and more if required for your individual setup.
7. Click OK and ensure that the checkbox for Enable App Rules is checked, as well as the Policy you just configured being Enabled.
Note: You could lock it down further by Zone. For example,
- Set Connection Side to Server Side or Both.
- Click on Advanced under Direction.
- Set the From and To fields as necessary.
Testing
From a device behind the SonicWall, try to play a video in the YouTube application or on the YouTube website after flushing the DNS cache of the device.
Related Articles
Categories