Blocking YouTube Videos con Squid

Squid Configuration File

Add this to squid.conf before the part where you allow people access to the Internet.
  • {X} As of Feb 2014 Google are using one subdomain of youtube.com for authenticating all google services, including Docs and Gmail. If you were intending to block only YouTube access this needs to be whitelisted from the denial.
## The videos come from several domains
acl youtube_domains dstdomain .youtube.com .googlevideo.com .ytimg.com

## G* services authentication domain
acl gLogin dstdomain accounts.youtube.com

http_access deny youtube_domains !gLogin

Other sites than YouTube also host this kind of content. See the Flash Video section of ConfigExamples/Streams/Other for general flash media patterns withut needing to block specific websites.

To block not all YT, but some clips, use focused acl rule:

# Block YT clips
acl yt_clips url_regex .youtube\.com\/watch\?v=lr_m3GW5Cws
http_access deny yt_clips

Comentarios

Entradas populares de este blog

Guía de herramientas básicas para estudiantes: 31 apps y webs imprescindibles para ayudarte con los estudios

Comando FOR para archivos BAT

How to Setup and Configure Your Own GitLab Server on Ubuntu 20.04