Tuesday, March 15, 2011

Blocking YouTube videos and Flash content

In this post, I show you how to block users from playing YouTube videos on your network. I also show you how to block Flash content embedded on web pages

image
Yes you could always block the URL youtube.com but this may not be effective as YouTube videos can be embedded in other websites and there are plenty of sites *like* YouTube out there. A more effective approach would be to block by MIME type, thanks to the enhanced content filtering capabilities built into TMG.
Before I get started, two important notes:
  • I mention YouTube because it is everyone’s favorite, but the steps below will work for Vimeo, and any other video sharing sites that rely on Adobe Flash technology.
  • The steps below can be used to block YouTube and flash content on ISA Server 2004/2006 too.
Blocking YouTube videos using TMG
1. On the TMG Console, right-click Firewall Policy, choose New Access Rule and create a new “Deny” rule named “Block Youtube” as follows:
Deny
Applies to: All Outbound traffic
From: Internal
To: External
All Users
Click Finish to close the wizard.

2. Do not apply the changes yet! Right click on the new rule you just created and choose Properties.
3. Open the Content Types tab. Click New.
4. Create a new Content Type Set as follows:
Name: YouTube
Available types: (type each of the below and click the Add button)
  • video/mp4
  • video/x-flv
  • video/x-ms-asf
image
5. Click OK. Ensure the check box next to your new content type set is enabled:
image
6. Click OK and apply your changes. Wait for the config synchronization to complete.
Test your changes by trying to play some videos on YouTube or other video sharing websites.

Blocking Adobe Flash Player content using TMG
1. Follow steps 1 to 3 above.
2. While creating a new Content Type set, use the following parameters:
Name: Flash
In the available types box, type:
application/x-shockwave-flash
3. Proceed with step 5 above.

Blocking additional MIME types
If you need to block something else, it is easy to find what content type to block. Simply monitor the Logging (Logs & Reports > Logging) in the TMG console. Once you encounter the log entry that allowed the content you want to block, expand the “Additional Information” and you will find the MIME type that you need to block.

image

0 comments:

Post a Comment