/ip firewall filter
add action=reject chain=forward content=www.youtube.com out-interface=Your_WAN_interface src-mac-address=PC:MA:CA:DD:RE:SS
Thank you very much I will try it and reply to you about itExample:Replace Your_WAN_interface and PC:MA:CA:DD:RE:SS with real values and fine-tune it to your needs and to lower CPU usage (i.e. filter only DNS requests).Code: Select all/ip firewall filter add action=reject chain=forward content=www.youtube.com out-interface=Your_WAN_interface src-mac-address=PC:MA:CA:DD:RE:SS
yep it did not work there is no way to block youtube for certain users ?This will not work. "Content" is not for URL, it is packet content. This way you will also block any webpages that mention youtube in their articles and other things.
yep it did not work i added mac address of client's station and tried to open youtube there and it opened ,i looked in the filter still the counters zerro no thing happened, there is no way to block youtube for certain users ?This will not work. "Content" is not for URL, it is packet content. This way you will also block any webpages that mention youtube in their articles and other things.
/ip firewall layer7-protocol
add name=youtube regexp=youtube
/ip firewall filter
add action=drop chain=input dst-port=53 layer7-protocol=youtube protocol=udp src-mac-address=PC:MA:CA:DD:RE:SS place-before=0
add action=drop chain=forward dst-port=53 layer7-protocol=youtube out-interface=Your_WAN_interface protocol=udp src-mac-address=PC:MA:CA:DD:RE:SS place-before=0
This works. Blocking DNS is about the only real way to stop a site as expansive and dynamic as Youtube - layer7 and content won't work on https:// connections, which is what Google forces nowadays.OK, this was just an example. Here is version that works:First rule works when using DNS server of router, second rule works with remote DNS. Use both rules in case user tries to change DNS. Try this and post your results.Code: Select all/ip firewall layer7-protocol add name=youtube regexp=youtube /ip firewall filter add action=drop chain=input dst-port=53 layer7-protocol=youtube protocol=udp src-mac-address=PC:MA:CA:DD:RE:SS place-before=0 add action=drop chain=forward dst-port=53 layer7-protocol=youtube out-interface=Your_WAN_interface protocol=udp src-mac-address=PC:MA:CA:DD:RE:SS place-before=0