Live data from Hacker News

Ad blocking with Raspberry Pi and Pi-hole

cri.dev

71–80 of 163 posts

Re: Ad blocking with Raspberry Pi and Pi-hole

#71

For my home desktop browser, I just use uBlock Origin to block ads. But for my phone, I set up a PiHole running on an EC2 instance and VPN into it from my phone. Blocks ads in everything, not just my web browser. The VPN is configured to only tunnel DNS lookups, not traffic, so the EC2 bandwidth bill is minimal.

Interesting that DNS look ups go to the Pi-hole in EC2, but the subsequent web requests come from the phone. This effectively nullifies the performance benefit of CDNs. Your phone is where ever it is, but your browser is being instructed to connect to edge servers that are geographically close to the AWS region where Pi-hole instance is running.

That said, the massive performance gains of blocking ads and intrusive 3PC probably more than makes up for it, but something to consider.

Re: Ad blocking with Raspberry Pi and Pi-hole

#72
post #70
post #66

The combination of pihole and raspberry pi has impressed me. I just checked and the last reboot of my pi was 180 days ago, and since then things have just worked. It's in stark contrast with my server, which admittedly has more demanding tasks. For $35 it's the most trustable computer I bought, I now have a lot of respect for the Pi foundation.

Is uptime really desirable in this situation? How do you get security updates for a device that lives near the edge of your network?

You're right that's a fair question. My comment was trying to highlight the robustness of the system more than uptime being a good metric for quality. By that I mean that I didn't _have_ to reboot to keep the system healthy enough to stay alive. That's unfortunately not the case of some other hardware I deal with.

For my Pi I regularly update without a reboot, but that might not be enough for kernel updates. I will look more into it.

Re: Ad blocking with Raspberry Pi and Pi-hole

#73
post #4

> Use it for ad-blocking in your home network and to finally browse the web, watch videos etc. without annoying ads. It doesn't really do this as well as a browser adblocker, YouTube ads for example can't effectively be blocked with pihole

it's not really fair to compare it to an in-browser adblocker that way, especially since using them isn't mutually exclusive. PiHole blocks ads whether you are in a browser or not, an instant benefit for everybody on your WiFi network.

Absolutely. Defense in depth; Pi-hole will cover devices that you can't install an ad-blocker on while the ad-blocker will cover some edge cases where Pi-hole can't do it.

It should never be considered an "or" situation; you want "both" as much as possible.

Re: Ad blocking with Raspberry Pi and Pi-hole

#74

Pi-hole has been excellent. I was able to discover that my Samsung TV was reporting minute by minute updates on what I was watching to a local Australian company. Unplugged it faster than I could swear.

Same with my Sony Android TV. That thing trying to phone god knows what home made up almost a third of all DNS requests on my home network, even with 2 adults working from home.

Since you can't buy dumb TVs anymore, you best leave the "smart" ones offline.

Re: Ad blocking with Raspberry Pi and Pi-hole

#75
post #20

Is anyone successfully using PiHole with non-technical users? My main concern with putting PiHole on my home network is that for example my mother in law might not understand that she can't get to some web page because it's being ad-blocked, nor would she be able to go to the web admin page and temporarily unblock it. Even as a technical person sometimes it takes a while to figure out that a page isn't working becaus…

I've set it up for most of my close family and friends, added a physical button to the top of the Raspberry Pi case that disables it for x minutes (x changes depending who they are and their needs), so if they're having issues they go press the button to access the problematic website. I keep reading about people having to disable the Pi-Hole so much that it becomes annoying, or constantly butting heads with websites…

I get occasional instances. I've let everyone know to let me know if they're experiencing issues and I can check the log and whitelist specific material that needs it.

That comes up now and again, not as much as you'd expect but enough that I needed to give instruction on it. Funny thing is, most of those cases are _me_ doing things like signing into Nvidia's software instead of anyone else here.

Re: Ad blocking with Raspberry Pi and Pi-hole

#76

For my home desktop browser, I just use uBlock Origin to block ads. But for my phone, I set up a PiHole running on an EC2 instance and VPN into it from my phone. Blocks ads in everything, not just my web browser. The VPN is configured to only tunnel DNS lookups, not traffic, so the EC2 bandwidth bill is minimal.

Interesting that DNS look ups go to the Pi-hole in EC2, but the subsequent web requests come from the phone. This effectively nullifies the performance benefit of CDNs. Your phone is where ever it is, but your browser is being instructed to connect to edge servers that are geographically close to the AWS region where Pi-hole instance is running. That said, the massive performance gains of blocking ads and intrusive 3…

Never actually thought of that, to be honest.

But for the most part, I imagine it won't make much of a difference. I live within 300 miles of the data center containing my EC2 instance.

Re: Ad blocking with Raspberry Pi and Pi-hole

#77
post #61

For my home desktop browser, I just use uBlock Origin to block ads. But for my phone, I set up a PiHole running on an EC2 instance and VPN into it from my phone. Blocks ads in everything, not just my web browser. The VPN is configured to only tunnel DNS lookups, not traffic, so the EC2 bandwidth bill is minimal.

What VPN are you using?

OpenVPN

Re: Ad blocking with Raspberry Pi and Pi-hole

#78
post #64

Earlier quoted context omitted.

Probably lightweight enough for the free EC2 tier too!

That is only free for 12 months though. Google Cloud and Oracle Cloud offer one free VM in their "always free" offering. Personally I use a $5/month Digital Ocean box.

I host Pihole on Digital Ocean as well.

Re: Ad blocking with Raspberry Pi and Pi-hole

#79

Earlier quoted context omitted.

What is the optimization gained by having 1KB cache slots when the cacheline size on Intel and ARM is typically 64 bytes?

Each cache entry needs a hash bucket so we can look up the entry in O(1), and we need more hash buckets than entries to minimize cache look up time. The hash bucket needs a copy of the element for each hit (to verify we hit the correct hash bucket), and a possible link to the next hash bucket, just in case we got a hash collision (we still need to store that link in memory as a null pointer regardless). [1] The strin…

Instead of building hash tables with buckets (and a linked list in case of hash collision), why not use a flat array based hash table and open addressing?
Post reply on HN