3
submitted 2 weeks ago* (last edited 2 weeks ago) by PlutoniumAcid@lemmy.world to c/selfhosted@lemmy.world

Hi all - please tell me if I'm doing this wrong:

My 12yo spends all day on YouTube shorts. I want to block it, but can only block YouTube entirely. Blocking for everyone would upset my 15yo, so I need per-client domain filtering.

That was easy on Pi-hole. But my Raspberry died and I heard praise for Adguard Home so now I run that as a Docker container.

  1. I can't figure out how to block YouTube for only some devices. Is that not possible with Adguard? Claude gives me complicated nonsense; you can easily do better.

I want to ditch Adguard and go back to Pihole. The caveat is that I must let Pihole run the DHCP server, in order to get correct per-client blocking. That's a pity, as I have a neat UniFi network set up.

  1. Can I get Pihole's per-client blocking without Pihole as DHCP?

I don't mind setting it all up in Pihole again (as yet another container) because I know it works (it's how I had it before the Raspberry died). But I would love to know if I am going about this the wrong way? Thank you!

top 11 comments
sorted by: hot top controversial new old
[-] Im_old@lemmy.world 2 points 2 weeks ago

Just so you know, you can run pi-hole as a container as well

About dhcp, I don't know about unifi, but I guess in the firewall you can configure static dhcp leases. So son1 devices always get same ip. Then you can configure a hairpin port forwarding, so any requests for ports tcp/udp53 from his devices get forwarded to pi-hole. That is assuming that in the "general" dhcp config you assign an external dns.

Otherwise you could try creating two different dhcp pools, one with pi-hole (and make sure son1 devices get a static lease in there) and one for everyone else.

As a side note, I recommend looking into self hosting your piped instance, so even son2 can enjoy YouTube without all the ads! (And the tracking)

[-] cereals@discuss.tchncs.de 1 points 2 weeks ago

You can also just block YouTube in your unifi firewall/router for that one client.

[-] KarnaSubarna@lemmy.ml 1 points 2 weeks ago* (last edited 2 weeks ago)

AdGuardHome is also self-hosted and does have this feature.

Actually in my cases, I have to block Facebook on all of my devices, but want to allow it for rest of my family members. So, I know its possible in AdGuardHome.

https://github.com/AdguardTeam/AdGuardHome

[-] MangoPenguin@lemmy.blahaj.zone 1 points 2 weeks ago

Adguard Home can do per-client filtering, if you go to Settings > Client Settings, then add a client and you can choose all the options.

No need for DHCP on Adguard to be enabled to do that.

[-] Godnroc@lemmy.world 1 points 2 weeks ago* (last edited 2 weeks ago)

I run AdGuard as an addon to Home Assistant. If you want to stick to AdGuard you can go to Settings > Client Settings and set a per-client filtering rule. There is a tab in the client settings that can be used to filter specific services with a click. Setting an IP reservation for your child's device in the DHCP settings of Unifi or your router will help ensure the IP address stays consistent.

For the PiHole option, you don't actually have to let the PiHole handle DHCP. You just need to tell your DHCP server what DNS server to use. For example, my router is .1 and my Raspberry PI is .2. The DHCP server, my router, tells all devices .1 is the gateway and .2 is the DNS server. You may also need to set these settings on the individual devices to prevent them from ignoring your DNS settings, but that can be done from the network settings. Avast had some safe networking "feature" that would force my DNS settings to be ignored, same with my Android phone.

Of course, the downside to all of this is that any different device, different IP, device from a friend, or mobile data could bypass these restrictions. You may soon be in an arms race with your child and chances are they can get more clever that you can in a shorter time frame.

[-] This2ShallPass@lemmy.world 1 points 2 weeks ago* (last edited 2 weeks ago)

You don't need DHCP, you can just use DNS and then set up different blocking groups based on the device.

The problem with this solution is that is it opt in. You would need to change all the wifi settings on each device separately to point to Pi-Hole as the DNS. This is something that could easily be disabled as a 12 year old would probably be able to figure out how to change the settings on their mobile devices or computer with a Google search.

[-] possiblylinux127@lemmy.zip 1 points 2 weeks ago

Don't do this at a network level. Do it on the device

[-] CompactFlax@discuss.tchncs.de 0 points 2 weeks ago* (last edited 2 weeks ago)

Just create a dhcp reservation in unifi.

[-] SheeEttin@lemmy.zip 0 points 2 weeks ago

That'll work great up until the kid finds out about changing the MAC address.

[-] CompactFlax@discuss.tchncs.de 1 points 2 weeks ago

Good; incentive to go learn something. Have a plan in place to deal with it though.

Firewall rules don’t replace parenting.

[-] cecilkorik@piefed.ca 1 points 2 weeks ago

Do it the other way around then. All devices have youtube blocked by default UNLESS you have a reserved DHCP where it is allowed. I imagine if the former is possible, the latter should be possible too.

this post was submitted on 13 Jul 2025
3 points (100.0% liked)

Selfhosted

50093 readers
154 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS