Blocking some ports to access Youtube

HI , i have a mickrotik router Model RB2011 Serie, in this router we have 10 ports , 5 Gig Ether Ports and the other 5 are FastEthern ports . My question is , how can i do if am to block some ports to go to youtube and facebook? , i would like to block some users but not all to access youtube and facebook in specific hours. please let me know if this is possible with this router.

thanks and awaiting for a response.

Blocking ports is useless. Youtube and Facebook use the normal ports 80 and 443.

Yes it is possible to block specific IPs of websites for the specific ports. You can do it via advanced port settings

thanks for your reply , i mean , i would like to block specific IP from accessing youtube and facebook , how can i do it ?.


for instance my network is 192.168.0.0/24 and i want to only block from 192.168.0.5 to 192.168.0.25x how can i do it ?


thanks and awaiting for your reply.

Hello, you can try this :

/ip firewall filter
add action=reject chain=forward protocol=tcp reject-with=icmp-network-unreachable src-address=192.168.0.5-192.168.0.254 tls-host=*.youtube.com

Adapt the src-address as you need.