OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: Noctur on February 21, 2018, 08:53:08 pm

Title: HowTo block Youtube.com while maintaining Google access
Post by: Noctur on February 21, 2018, 08:53:08 pm
I have tried to block youtube for a while now and was unsuccessful because Youtube is now part of Google. Blocking Youtube has resulted in blocking access to Google services. It is important for me to allow use of Google services, i.e. docs, so I haven't been able to selectively block Youtube until now.

This seems to have worked for me. Youtube is not accessible but Google Docs are. Does anyone foresee an issue with the following approach?

Services >> Unbound DNS >> Overrides.

"+" to Add New

Domain:  www.youtube.com
IP Address: 127.0.0.1
Desc: Youtube Block

Save

I have tried to get around it by going to www.youtube.de and it is still blocked. I haven't tried facebook or twitter, but they seem to be other sites people frequently want to block.

Is there a way to make this subject to a schedule? TIA
Title: Re: HowTo block Youtube.com while maintaining Google access
Post by: elektroinside on February 21, 2018, 09:05:36 pm
You can do that with IDS/IPS. It's not that easy but it is a rock solid solution, difficult to avoid.
You could also use OpenDNS and configure a youtube block in your OpenDNS account, but that is easy to get around, so you'll also have to enforce your DNS related firewall rules...
Or both...

Or you could use a custom DNS server you host yourself, like Pi-hole.

Many ways to achieve efficient filtering, you have to pick one :)

Mind you that there are ways to avoid all of these filterings :P
Title: Re: HowTo block Youtube.com while maintaining Google access
Post by: Noctur on February 21, 2018, 11:47:35 pm
Yes. This setup works for me and only takes about 30 seconds to put in place. It will block casual attempts. TOR gets past it easily.

The down side is this blocks for all users 100% of the time. I don't see a way to selectively block users or set a block schedule.
Title: Re: HowTo block Youtube.com while maintaining Google access
Post by: elektroinside on February 22, 2018, 08:44:37 am
With IDS/IPS you could also select sources:
https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Suricata_Rules