How to block YouTube

How do you block this site using the mikrotik?

  1. Do a host lookup under your favourite OS example..

[TestBox]# host youtube.com
youtube.com has address 208.65.153.253
youtube.com has address 208.65.153.251
youtube.com mail is handled by 10 sjl-mbox1.sjl.youtube.com.

It should show which ip’s handle the site.

  1. add these ip’s to a address list..

/ ip firewall address-list
add list=youtube address=208.65.153.251 comment=“” disabled=no
add list=youtube address=208.65.153.253 comment=“” disabled=no

  1. You can block the site by adding drop rule under:

/ip firewall filter add action=drop dst-address-list=youtube chain=forward

Haven’t checked this properly but should work.

Now the only question is why?

not work for me.

Look up web proxy on the wiki and install it transparently, then look up web proxy rules and use them to block Youtube (and Facebook, since I believe you’re in that thread, too).