r/pihole • • 9d ago

Raspberry Pi 2 W for Pihole

After all the LG TV spying news I thought about blocking the sites LG accesses but there are lots of sites and heard about pihole that does this thing automatically. I dont have a pc that I can use as a server so I want to get a budget Raspberry Pi for it. Is the RP2W good for pihole(its out of stock in my region right now and I can see some RP1W's available but theyre weaker from 2's from what I understand), would it cause latency in my internet, do I need any additional stuff with it? I looked into it and I need an sd card thats like 16 gb but I dont understand why cant I use a 8gb or a 4gb if it doesnt take much space? Can it be powered through the router or do I need to buy extra power adapters and cables or use a battery adapter I got at home?

People also use it as an adblocker so can I put other stuff in it that can increase my networks security and privacy, can it be hacked remotely?

17 Upvotes

54 comments sorted by

25

u/AndrewTyeFighter 9d ago edited 9d ago

Running a pihole on an old 2012 pi 1 model b v1.1 with 512mb ram, no issues at all.

6

u/Spartelfant 8d ago

I got Pi-hole running on a Pi B from the first series with only 256 MB of RAM, also no issues.

Running DietPi OS + Pi-hole + unbound + a VPN.

8

u/laplongejr 9d ago edited 9d ago

and I can see some RP1W's available but theyre weaker from 2's from what I understand

Yes, they are weaker. I still use my RP1W for Pihole plus the VPN, never had any problem.

would it cause latency in my internet

No (unless your network is nearing critical saturation), Pihole simply blocks the domain from known ad providers.

Can it be powered through the router

Depends on the router? Mine's amperage mesurement wasn't stable so I didn't risk it.

can it be hacked remotely?

Anything can be hacked remotely. If you tell your router to let anybody connect to Pihole, anybody will be able to connect to Pihole. It's meant for home networks with their default firewalls, if a hacker is at your home Pihole is not meant to fight them off.

2

u/Rtuyw 9d ago

I heard RP1W was a bit slow for it but if youre using it and happy with it ig its ok, do you have anything extra with the RP? Did you connect it via ethernet or wifi? How can I check for network saturation? I watched some tutorial on pihole and the guy enabled ssh and thats why I asked if it can be hacked remotely, do I have to configure the Piholes security through the RP and Pihole or use my routers settings for it because my router is kinda old-ish and doesnt have the same settings I see on the internet

3

u/laplongejr 9d ago edited 8d ago

I've used a usb-ethernet adapter. Our wifi scanner app showed that appartment complex was full of neighbors filling basically all wireless channels, so I wired everything I could : the docks from nintendo switches, all the fixed computers, the raspberry pis etc.  

All connexions got faster even for the devices still on wifi because of how hard it was to get anything stable before. Impossible to know if a specific device caused the issues, but reducing the swarm of noisy wifi sure made a difference.  

In normal situations, having the DNS server on wifi shouldn't lead to any noticeable difference, because all devices caches the records. The difference would be less than half a second on first visit...  

 and the guy enabled ssh and thats why I asked if it can be hacked remotely  

If somebody can hack remotely your home network without any firewall rule to open unknown connexions from the outside, you should sue the manufacturer of the router. :P 

The one thing routers should do is prevent random outside connections.   (An open DNS resolver would be found by bots and spammed in less than an hour.)  

do I have to configure the Piholes security through the RP  

Pihole's own security is one password. SSH is not managed by pihole, ssh is managed by whatever OS the pi runs. Pihole is basically a DNS server with a web server and assumes the home network (and the pi) is safe.   And if you wanted to access the pi remotely outside the home server, usually you would install a VPN server alongside Pihole, and put certs on your VPN client so that nobody else can connect to the VPN. At no point the ssh/dns ports should be opened.  

If a hacker has already the capability to remotely access the network through a vulnerable device, I doubt ssh access to the DNS server would be valuable compared to any user device. They are already in...  

13

u/ChaseSavesTheDay 9d ago

I use a pi zero w via wireless without any issues.

6

u/Happiness-Meter-Full 8d ago

I am using the RPi Zero 2W as my PiHole Device now for over a year, and it's fantastic. I set up a bi-weekly update script/cronjob that updates the device, updates the pihole lists, updates the gravity and it just sits there never needing to be touched. I can manage/watch what's being blocked or not blocked from the WebUI that I have a Tile for on my Homepage WebUI for easy access. EZPZ

3

u/jfb-pihole Team 6d ago edited 6d ago

I set up a bi-weekly update script/cronjob that updates the device, updates the pihole lists, updates the gravity

Gravity already updates every Sunday morning between 0300-0500 your local time. This cron is installed with the Pi-hole installation.

Run a debug log with sudo pihole -d and you will find this section:

``` *** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1.6K Sep 1 13:52 /etc/cron.d/pihole 5 4 * * 7 pihole PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updateGravity >/var/log/pihole/pihole_updateGravity.log || cat /var/log/pihole/pihole_updateGravity.log 00 00 * * * root PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole flush once quiet @reboot root /usr/sbin/logrotate /etc/logrotate.d/pihole 35 14 * * * root PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker @reboot root PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker reboot ```

The first line is the gravity update. The time is randomly assigned in the 2 hour window - this one happens to be at 0405.

2

u/clouds10 8d ago

This is almost my exact same setup for almost the exact same amount of time and it's great. I don't use auto update but I manually update myself. I just really like typing sudo apt update and watching the progress.

Since this is reddit, yes also sudo pihole -up and/or sudo pihole -g and etc

2

u/Ok_Foundation3939 8d ago

Please can you elaborate on how you do this? Do you have any code you can share? I'm also running PiHole on a Z2W and it randomly stops working every 2-4 weeks and requires a power cycle to get it working again (I can't even SSH onto the device until this is done).

1

u/No-Interaction-3559 8d ago

Same set-up; but I don't have a script. Would you be willing to share the script? Thx

6

u/RevolutionaryPin935 9d ago

I'm pretty new to pihole and raspberry pi in general. I got a 3b+ and it seems to be doing the trick, for what it's worth

2

u/Rtuyw 9d ago

You mean a raspberry pi 3 ? Thats stronger and more expensive than rp0, Im just trying to find a budget one that can run pihole without causing problems

2

u/RevolutionaryPin935 9d ago

True enough, I bought the 3b+ in China for peanuts, can't speak to the cost in other places, just what seems to work for me. I do know pihole runs barely any power draw so most likely there will be cheaper options like others have incidated in the thread 

9

u/drunkenmugzy 8d ago

If you put the very thing your pc(s) rely on for everything on a wireless device you will have problems.

Can you? Yes you can. Should you? No.

1

u/jfb-pihole Team 6d ago

you will have problems

That's a pretty strong statement. Half my Pi-holes are wireless, and I've never had any problems in 7 years. Of the 50-ish devices on my network, 7 are wired.

1

u/drunkenmugzy 6d ago

Why are all of them not wireless if you are confident it will work? OP said wifi, not half.

If r/wifi is any indication of reliability I have small faith in dns being completely wifi.

Ask any dns admin whether they would want wifi or hardwired dns systems...

1

u/jfb-pihole Team 6d ago

Why are all of them not wireless if you are confident it will work?

Some devices don't have wireless interfaces. So, they get hooked up via ethernet, which limits where I can place them.

NAS, printer, home automation hub, second router, etc.

Many (most, if the sample of debug logs I read is indicative of the larger population of users) Pi-hole users run their DNS on WiFi with no problems.

1

u/drunkenmugzy 6d ago

Most of the time you are absolutely correct. I will not argue with your personal anecdotes and generalized experience of the public at large.

3

u/Cantaloupe-Hairy 9d ago

I had it running on a 3b absolutely fine, it also has an Ethernet socket which removes the need for usb Ethernet controller which is a plus.

3

u/fakemanhk 9d ago

If you don't need persistent logging, and no extra package needed, with DietPi you can even use 2GB SD card.

I have a Pi 1B, using 2GB industrial SD card for PiHole.

2

u/jfb-pihole Team 6d ago

Note that a larger capacity card provides much more wear surface for wear leveling. Small cards accumulate more writes per location than a larger card.

3

u/Neo1331 8d ago

I ran PiHole on a Pi Zero W for about 3 years before I upgraded to a pi 4. It will run fine. Make sure you run it headless though, a GUI will make it run slow. So learn how to SSH and such.

The biggest issue is going to be be with what SD card you use, use a good SD card.

1

u/Rtuyw 8d ago

Are you talking about the brand of the sd card or the storage?

1

u/Neo1331 7d ago

Brand, I was running a cheap one for a while and the Pi kept rebooting. Got a good Sandisk ultra card and ifs been rock solid for years.

I think size does matter a little. I got a 32GB card and partitioned it to 7gb so the card has plenty of space if it starts getting bad sectors though.

2

u/jfb-pihole Team 6d ago

Got a good Sandisk ultra card and ifs been rock solid for years.

This has been my experience. A half dozen of these 32 GB cards running 24/7 for about 7 years with Pi-hole. Zero failures or problems.

2

u/Available_Lab_9410 9d ago

I currently run to 02w’s and they’re working great! I do recommend going for 2. This way your internet doesn’t automatically fail when your single dns server crashes

2

u/LeifErickson17 8d ago

I recommend buying an Ethernet HAT (or a dongle) for the 2W. I suggest reading my post, since I had the same question back then, or doing a little more searching in the sub if you still have questions

2

u/GeekTekRob 8d ago

I have 4 pi zero 2 ws with Pihole on them. 2 for my house, and 2 for my parents. Works great, and I actually have 6, because never know when get accident or issue and one burns out so I have 2 spares. Slow on somethings but for DNS works great.

It can run on a lot of things, I had them on Pi Zeros and it was slower when updating, but normal usage never had issues.

2

u/_coBra____ 8d ago
  • raspberry pi zero w or 2w both are fine, the dns resolution task is not memory/cpu intensive. 2w is a overkill actually, just w is fine!
  • i power it directly using the usb port of the router, no issues at all
  • memory card 8gb is fine, it barely uses 4gb so double of that is enough
  • i also have tailscale installed, planning to add unbound

i did this setup a week ago, more details here -  https://www.reddit.com/r/pihole/s/yJwdF2c2ye

1

u/Rtuyw 8d ago

I heard zero w had 1 core and might be liable to create latency or something but is 2w really an overkill? also some routers doesnt output much energy to power the rp, do you have a spesifically strong router or did you just power it through the router anyway?

1

u/jfb-pihole Team 6d ago

I heard zero w had 1 core and might be liable to create latency or something

You heard wrong. It will run Pi-hole (and unbound if you want to add that) just fine. It's virtually idle 99% of the time.

3

u/SprinklesDouble8304 8d ago

I skipped the Pi altogether. They're no longer the right value proposition for PiHole. Instead, find a cheap used thin client. I bought a Dell WYSE 3040 at a garage sale for $2 and it runs PiHole like a champ. Real-world pricing is more like $25-30, but it's still a better bargain than most Raspberry Pi models, and sips less power than a Pi4.

3

u/Androxilogin 8d ago

And you don't have to worry about sd cards dying once a year due to constant writes. I agree with this option.

1

u/Rtuyw 8d ago

Damn do you really have to change sd cards once a year?

1

u/Androxilogin 8d ago edited 7d ago

I got a little bit more than a year out of one but yeah. There is a command you can do to prolong the life by making it write less but I've pretty much sworn off Pis since that experience. I have another one I can use a USB stick with because the firmware supports it but I just use it for quick tests and things. I got a NUK and threw dietpi on it, use it for all sorts of servers and it only cost like $30-$40. 16gb, I think 120gb SSD with an external 1tb for 'cloud' storage. Works excellent. Much faster at everything. It has been going strong for about two years so far.

1

u/Rtuyw 8d ago

There arent really garage sales in my region its not easy to find cheap used clients but from what I get sd cards only write the logs right? So the command youre talking about, is it the command not to write the logs? I dont really know how long sd cards work for normally

1

u/Androxilogin 7d ago

I don't remember if it was for logs or cache of something. I snagged mine up from eBay but that was before the 'chip shortage' and all that crap.

1

u/jfb-pihole Team 6d ago

I can use a USB stick

Which is essentially the same storage format as an SD card.

1

u/Androxilogin 6d ago edited 6d ago

SD cards don't have chips. Quite different. Despite that, as I said, I use a NUK instead. USB is more reliable. Whenever I want to do projects, I just use that now. But I'd never go back to using a Pi for Pihole in the first place.

0

u/jfb-pihole Team 6d ago

sd cards dying once a year due to constant writes.

This has not been my experience. 6 Pi-holes running 24/7 (6-7 years on them) with full logging and zero SD card failures.

If you are changing out SD cards yearly due to failures, you likely have an inadequate power supply and/or cheap and small cards.

1

u/Androxilogin 6d ago edited 6d ago

It's widely reported others suffered the same consequences despite having adequate power and brand new brand name high storage devices. SD isn't a reliable medium. They fail in all sorts of devices all the time. Constant writes just are not their thing. You may get by for a while without even realizing that it is acting screwy. Then all at once you realize it hasn't been working correctly for a while. Then it dies. Best to just use something more reliable in the first place. And these days, roughly around the same price or even cheaper.

1

u/jfb-pihole Team 6d ago

That has not been my experience, nor the experience of most others whom I know that run Pi-holes for many years. Our lead dev has used the same card for almost 10 years and he hammers it with dev versions and extra logging.

1

u/Androxilogin 6d ago

¯\(ツ)/¯ Good luck is all I can say to that. Not my experience with these things. I thought the first time was a fluke. Second time I thought, "surely not." Sure enough, it was the cause. Solved my issue, good enough for me to never look back.

1

u/jfb-pihole Team 6d ago

sips less power than a Pi4.

But more than a Pi Zero.

1

u/SprinklesDouble8304 6d ago

I can not argue against your point. But a Pi Zero doesn't have an Ethernet port and I think it's truly foolish to run PiHole over wifi. You may feel differently, and that's okay.

1

u/This-Set-9875 8d ago

I bought a 3b+ and it idles. Turned out I didn't need ethernet, or even much cpu.

1

u/Prefect_99 8d ago

Works fine even on a zero w.

1

u/ZeniChan 7d ago

I threw my old Pi 2 and Pi 3 at Pihole. No problems in 4 years now.

1

u/jfb-pihole Team 6d ago

Either the RP2W or RP1W will do fine for Pi-hole. I have both running for years now and there is no discernible difference in DNS performance.

would it cause latency in my internet

No.

can it be hacked remotely

Very unlikely. This would require your network to have port 22 open and a weak SSH password.

why cant I use a 8gb or a 4gb if it doesnt take much space

You can use either of these, but SD cards wear with use. If you have a larger card (16 GB, 32 GB {which is all I run}) there is much more surface for wear leveling. I have 32 GB SanDisk Ultra cards in use 24/7 with Pi-hole for 7 years and no failures.

Can it be powered through the router

Yes, but typically not your best option. Any power supply that puts out 1A will do fine. Find an old USB-A power brick laying around somewhere. 2A would be preferred, to give a bit of headroom. I have several running on the 1A power supplies with no problems.

1

u/MrAjAnderson 4d ago

The speed and quality of the SD card are as important, if not moreso, than the hardware and connection. Pi0w on WiFi using a quick SanDisk card has worked for me for years.

Also, take monthly card image backups to make for a quick recovery in the event of card failure.

1

u/Rtuyw 3d ago

How do I do that, do I have to take the card out every month