Blocking YouTube blocks other Google services

OpenWrt 19.07.5

Issue: Blocking YouTube on the firewall is blocking Google Docs and Hangouts

Context: I followed the instructions here to configure firewall reject rules for YouTube, Discord, and Twitch because my kids are doing remote school full time using Chromebooks. The problem is they are distracted by Chrome tabs open to the sites mentioned. The rule works fine blocking Twitch and Discord but YouTube is blocking more than YT.

Is it possible to only block YouTube?

IP sets don't work well for resources relying on CDNs which serve different domains, i.e. there's always some collateral damage.

You can try other methods, but each of them has its own pros and cons.

3 Likes

Blocking these will stop access to YT.

1 Like

i use "hosts" file to block access to youtube the file look like

127.0.0.1 localhost 
127.0.0.1 www.youtube.com 
127.0.0.1 m.youtube.com
127.0.0.1 youtube.com 
127.0.0.1 youtu.be
127.0.0.1 l.google.com 
127.0.0.1 googlevideo.com

also for other websites/apps you can ssh to your openwrt router, type
tcpdump -ni br0 dst port 53 | tee log
and pop open a browser only connecting to youtube. Only have one LAN/WLAN client online when you do this. The file 'log' will contain all outgoing dns requests from interface br0, in cleartext. That could work as a base for a blacklist, but you have to trim it, and be careful to remove stuff like 'update.windows.com' and similar domains.

This seems simple enough...

I appreciate the responses guys but the issue isn't YouTube not being blocked.

The problem is when the YouTube rule is enabled, Google Docs is also blocked preventing my kids from sending or receiving assignments with their teachers.

I discovered this after enabling the rules and they told me access to Google Docs and Google Hangouts stopped working. I disabled the YouTube rule and both immediately started working again.

@vgaetera I checked the other methods link you provided and the Adblocking may be the best suited. I will do some research on that option and see how it goes

1 Like

May Google services share the same IP addresses, thus you cannot block YouTube by IP address without blocking other services.

1 Like