How to block YouTube with URL Content Filter and DNS Filter?

This document introduces how to block YouTube and YouTube app with URL Filter and DNS Filter.To block YouTube App, we need to block HTTP/HTTPS packets which contains keyword "youtube", "ytimg" and "googlevideo" by URL filter, and since URL Filter might not recognize the encrypted connections, DNS Filter is required as well to sort the packets.

(For blocking YouTube on Vigor3900, Vigor2960 or Vigor300B, please refer to the article here.)

   

1. Create a Keyword Object Profile at Objects Setting >> Keyword Object. Click an Index number

  1. Enter Name
  2. Enter Contents with the 3 required URLs, "youtube.com" "ytimg.com" and "googlevideo.com", separated by a single space
  3. Click OK to save.
   

2. Create a URL Content Filter Profile at CSM >> URL Content Filter Profile. Click a Profile number.

  1. Enter Profile Name
  2. Select Priority as "Either: URL Access Control First"
  3. Enable URL Access Control
  4. Select URL Access Control Action as "Block"
  5. Click Edit and select the Keyword Object created in Step 1
  6. Click OK to save
   

3. Create a DNS Profile at CSM >> DNS Filter. Click on a Profile number in DNS Filter Profile Table.

  1. Enter Profile Name
  2. Select UCF as the URL Content Filter Profile created in Step 2
  3. Click OK to save
   

4. To apply the URL Content Filter and DNS Filter to the Firewall Rule, go to Firewall >> Filter Setup >> Set 2. (Default Data Filter). click on a Filter Rule number

  1. Enable the Filter Rule
  2. Edit the Source IP to which this Firewall Rule should apply
  3. Select Filter as Pass Immediately
  4. Select URL Content Filter as the profile created in Step 2
  5. Select DNS Filter as the profile created in Step 3
  6. Click OK to apply
   

5. After finishing above settings, YouTube APP will be blocked on LAN client's mobile device.

 

Trouble Shooting:

If YouTube is not blocked as expected, please do the followings:

  1. Clear browser's coockie and history.
  2. Clear DNS cache on the computer, for Windows users, this can be done by enter the command "ipconfig/flushdns" in command promt.
  3. Make sure the computer's default gateway is Vigor Router
  4. Check the DNS server of the computer, enter "nslookup" and check the DNS server of your computer.

    • If the server is a public DNS server, please make sure the computer's gateway is set to Vigor Router. Please also check if there is another Filter Rule that may pass the packet already.
    • If the server is an internal DNS server, please make sure the internal DNS server's gateway is set to Vigor Router.
    • If the server is your Vigor Router, please enable DNS Filter Local setting in CSM >> DNS Filter instead of applying DNS Filter Profile to a Firewall Rule, and please note that DNS Filter Local Setting will apply to all LAN clients who use the router as DNS server. (See The difference between DNS Filter Profile and DNS Filter Local Setting)
   

 

 

Was this article helpful?
55How to block YouTube with URL Content Filter and DNS Filter? has been viewed------ 55 ------times.