I have a MikroTik router. I want to allow only Youtube videos and block all other videos. I tried to write an extended ACL but I really have no idea. Maybe allow only Youtube videos source URL and block other URLs? Can you guys help me?

  • 3
    This is going to be an incredibly difficult, if not impossible task to accomplish. Why would you like to do that?
    – user163495
    Commented Oct 29, 2019 at 10:39
  • 2
    Let me guess: you want to block porn? If so, there are many, many other better ways to do that.
    – schroeder
    Commented Oct 29, 2019 at 10:47
  • There's porn on YouTube anyways, so this isn't a very good way to stop people from looking at it.
    – user
    Commented Oct 29, 2019 at 13:05
  • @user yes, but Google has controls to block that.
    – schroeder
    Commented Oct 29, 2019 at 13:09
  • @schroeder If the question author is concerned about blocking sites at the router level then I'm pretty sure that the network users can bypass local restrictions.
    – user
    Commented Oct 29, 2019 at 13:27

2 Answers 2


As Far As I know, you have 3 choices:

  1. You can use URL filtering by allowing "youtube" or any URLs in the MikroTik firewall in the layer7 protocol field and deny the other specifically or deny all as that link shows.
  2. You can use content filtering to block Adult WebSites in your MikroTik.
  3. You can use proxy servers such as Squid for URL filtering.

There is also another solution that may help you, you can monitor your network NetFlow Traffic and find out what is exactly going on, on your network and based on that you can provide a good and suitable solution for issue.


You can read a detailed article at the squid-cache wiki: https://wiki.squid-cache.org/EliezerCroitoru/Drafts/YouTubeFiltering

Technically you will need to use the next REGEX to block or allow a specific video. To define a policy you will need to use some wildcard match at the end of the policy in the Proxy/firewall.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .