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?
As Far As I know, you have 3 choices:
- 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.
- You can use content filtering to block Adult WebSites in your MikroTik.
- 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.
(^|.*\.)youtube\.com/embed/##VID## (^|.*\.)youtube\.com/watch\?v=##VID## (^|.*\.)ytimg\.com/.*/##VID##/ (^|.*\.)youtu\.be/.*##VID##.*