OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: stuffu on September 13, 2023, 04:40:37 PM

Title: Help with YouTube block on selected devices
Post by: stuffu on September 13, 2023, 04:40:37 PM
I read into the alias part https://docs.opnsense.org/manual/aliases.html (https://docs.opnsense.org/manual/aliases.html) but I don't understand how to assign specific IP:s to the alias.

I have two devices with static IP addresses and I want to block YouTube on those devices.

Can someone explain how to achieve that? My kids watch YouTube for approx 36 hours/day...  ;D
Title: Re: Help with YouTube block on selected devices
Post by: Saarbremer on September 13, 2023, 08:15:50 PM
Hi,

that's not what firewall rules are made for.

You may need an application firewall for HTTPS (also called web proxy) or just block DNS (may be tricky, too) or go with this: https://www.zenarmor.com/docs/network-security-tutorials/how-to-block-youtube-on-opnsense
Title: Re: Help with YouTube block on selected devices
Post by: stuffu on September 14, 2023, 10:22:28 PM
Thanks, but my router can't handle Zenarmor unfortunately. I can't find the post now, I'm pretty sure I read a post a while back someone blocked YouTube and subdomains using a rule. I could be wrong but any advice appreciated!
Title: Re: Help with YouTube block on selected devices
Post by: cookiemonster on September 14, 2023, 11:34:37 PM
Try AdGuardHome plugin. Light on resources. Has an option to block youtube.
Or try a domain override in Unbound.
A service like AdGuardH is better suited as it has worked out the subdomains and all that jazz that is harder on ip addresses only.
Title: Re: Help with YouTube block on selected devices
Post by: stuffu on September 15, 2023, 10:41:04 AM
I have thought of AdGuard but I don't think you can limit access on device level?
Title: Re: Help with YouTube block on selected devices
Post by: Seimus on September 15, 2023, 10:53:30 AM
Not sure about AdGuard but,

On Pihole you can create groups per devices and block specific domain for a specific group/device. I am doing it home to prevent access to certain contented for certain VLANs.

Regards,
S.
Title: Re: Help with YouTube block on selected devices
Post by: cookiemonster on September 15, 2023, 11:13:30 AM
I don't use this particular functionality of AdG but the section for identifiying clients read:
"Identifier:
Clients can be identified by their IP address, CIDR, MAC address, or ClientID (can be used for DoT/DoH/DoQ). Learn more about how to identify clients https://github.com/AdguardTeam/AdGuardHome/wiki/Clients#clientid (https://github.com/AdguardTeam/AdGuardHome/wiki/Clients#clientid)."
Then the blocks and filter can be applied per client as well.
Seems worth a try.
Title: Re: Help with YouTube block on selected devices
Post by: senseuser on September 15, 2023, 11:24:26 AM
Everything is blocked perfectly in AdGuard Home. You can set different locks for different clients.
(https://i122.fastpic.org/big/2023/0915/50/8c6138947dc2c2100061c2ec1b17d350.png) (https://fastpic.org/view/122/2023/0915/8c6138947dc2c2100061c2ec1b17d350.png.html)
Title: Re: Help with YouTube block on selected devices
Post by: stuffu on September 15, 2023, 01:56:42 PM
Thanks! Will look into it!
Title: Re: Help with YouTube block on selected devices
Post by: stuffu on September 27, 2023, 11:10:36 AM
Quote from: senseuser on September 15, 2023, 11:24:26 AM
Everything is blocked perfectly in AdGuard Home. You can set different locks for different clients.

Had only seen the global settings before, this did the trick! Big thanks!