Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
Loading...
Loading...

HOWTO: How can I allow access to specific YouTube videos?

Expand / Collapse


This article applies to:

  • WebMarshal 6.X and 7.X

Question:

  • How can I allow specific YouTube videos and block the rest?

Preferred Solution:

In WebMarshal 7.X, you can enter a URL with querystring parameters directly in a URL Category. It may be conceptually easier to allow or block videos using URL categories. However the procedure described below continues to work.


Alternate Solution:

You can use a TextCensor script and Content Analysis Rules to allow specific videos based on the unique code that YouTube uses to identify the video.
  • Note: As written this procedure blocks ALL YouTube pages except the videos you specify. For instance, the YouTube home page, channels, and login are not available.
  • The selected videos will be available both within YouTube and embedded in other sites.

You MUST enable HTTPS inspection for the YouTube URLs.

The specific instructions in this procedure are written for WebMarshal 6.10. The ideas can be used with any WebMarshal 6.X or 7.X version.

Create a TextCensor Script

  1. Navigate to M86 WebMarshal ->Policy Elements ->TextCensorScripts
  2. Create a new script that contains the following expression for each video you want to allow:

    Score: 10

    Expression: 253D<YouTube Video ID>

    • For example, if the video you want to allow is:
      https://www.youtube.com/watch?v=HEheh1BH34Q
      the Expression will be:
      253DHEheh1BH34Q

  3. Give the script a name, such as Allowed YouTube, and save it.

 

Create a URL Category for YouTube

  1. Navigate to M86 WebMarshal->Policy Elements ->URL Categories
  2. Create a new URL Category and add the URLs for YouTube including HTTP and HTTPS variants.
    • Note: HTTPS URLs will only be controlled if WebMarshal HTTPS inspection is enabled and YouTube URLS are inspected.
    • YouTube currently redirects all requests to HTTPS, so this procedure will not work if HTTPS inspection is not enforced for YouTube.

Create a Rule Container and Rules to apply the policy

  1. Navigate to M86 WebMarshal ->Access Policy->Content Analysis Rules
  2. Create a New Rule Container in the Global Policy section
    • You can choose to create this container in another section if you want the rule to apply to specific users.
  3. Choose Where the URL is a member of Category, and select the YouTube Base URLs category.
  4. Save the new Rule container.

  5. Within the container, create a rule to apply the TextCensor script created above, and skip further rules if it matches:
    • Choose Where the content matches all of TextCensor Script, and select the Allowed YouTube script.  
    • Choose the action Skip all remaining rules in this container.

  6. Within the container, create a rule to block all other requests.

  7. The rule container should now appear similar to the following:

    Content Analysis Rules

    [Allow Some YouTube Videos]
    When a web request is received
    For any users
    And where the URL is a member of YouTube Base URLs

    Process rules in this container


    Find Allowed Videos
    When a web request is received
    For any users
    And where addressed to any URL
    And where the content matches all of Allowed YouTube

    Skip any remaining rules in this container

    Block All Others
    When a web request is received
    For any users
    And where addressed to any URL

    Block the file and display Blocked page
          Or abort the download of this file and display FileAborted page
    And do not process any further content analysis rules
  8. Move the new rule container near the top of Content Analysis rules. Ensure it is the first rule to trigger for YouTube sites.
  9. Commit configuration to apply the change.

Notes:

  • To manage access to videos, edit the TextCensor script. Remember to commit changes after you add or remove items from the script.
  • This procedure has been verified at the time the article was reviewed.
  • The technical design of the YouTube site could change at any time, so you should re-verify the access control periodically.


    To contact Trustwave about this article or to request support:


    Rate this Article:
         

    Add Your Comments


    Comment submission is disabled for anonymous users.
    Please send feedback to Trustwave Technical Support or the Webmaster
    .