PiHole directly on Routers (Tomato, MerlinWRT, DD-WRT, openWRT)

I have had a response to my post on the DD-WRT forum :
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=1074731

What work, if any, have you done towards modifying the scripts to run on DD-WRT on a USB device? The internal Lighttpd should be suitable to run the web interface on, and of course an external dnsmasq.conf file can be placed in /jffs/etc to configure the internal dnsmasq server.

If anyone knows the answer - can you reply? Or I can reply to the post if you dont have an account. I'm just not sure whether this is already possible.
Thanks.

@DL6ER - thanks for the feedback.
Glad to hear using an RPi with openwrt could be an option.
Concerning who both can do this & has the time to do so.. I'm not sure...
Unfortunately I don't think I have the skills/know-how to do this, unless there is good documentation to follow.
Maybe an existing/experienced OPKG packager from openwrt or the LEDE project could step in.

@Rockvole - not sure I follow you.
My suggestion of using an RPi was merely to facilitate the work of porting PiHole to openwrt, without PiHole devs having to own/use a router device.
Since they already have RPis hanging around to develop&maintain PiHole, it was an easy thought to think maybe flashing openwrt onto a miniSD card for the RPi could facilitate this endeavour.
Using an RPi as a router could be a fun project, though somewhat of a niche project/distraction, and was not what I was suggesting.

1 Like

I wouldn't be able to aid development, but I do know how to install via SSH and would be VERY keen for this integration!

So this github projecct kinda exists:

Google cache version

The non-cache verion gives a 404

Are one of you guys debiansid?

This is a very impressive open-source project and the UI is logical and easy to use.

I think it could reach mass adoption if it was available as part of DD-WRT in a router you could buy.
Something like the Buffalo Airstation N300 would be a good fit I think ?

I'm sure a kickstarter to buy a device like that would be popular.

It may be out-of-scope at the moment, but it's definitely something to look into.

1 Like

Do a lot of people buy routers with DD-WRT installed? I was under the impression that most installed it themselves. That being said, I'm interested in this idea as well.

If you have DD-WRT installed on your router, why not SSH in or use the web ui command line to attempt a pihole installation? You might have to get creative with the iptables or ufw (whatever DD-WRT comes with), but I imagine the rest should be pretty straightforward.

I only ever buy routers with the capability of running DD-WRT and usually upgrade them once something limits me in the original firmware. The DD-WRT builds for the router depends on the capability of the router, so I expect older routers would not be capable of supporting Pi-Hole. That includes my current router - which I would certainly upgrade if there was a Pi-Hole supported one.

I'm sure its true that anyone who can install DD-WRT is also capable of installing Pi-Hole, but most would probably not have heard about Pi-Hole unless it was an option on DD-WRT.
I feel like the most natural place for Pi-Hole to exist is on a DD-WRT tab. I think it would be a boost to open source since it would be a capability not on commercial routers.

Personally I try hard to simplify my network because I know if I go on a trip my wife may end up with no network and I will be in trouble if she cant watch netflix :slight_smile:
Its usually powerline ethernet devices which need rebooting lately though.

I misunderstood what you meant about using DD-WRT. I too only buy routers with the option of flashing new firmware. Thought you meant buying a router with DD-WRT/pihole pre-installed.

I like the idea of eventual incorporation into DD-WRT, however I think it would be more in the scope of their project than pihole.

The only thing I could find on running custom services on a DD-WRT router:
https://www.dd-wrt.com/site/professional/customization

I agree that its more like an improvment to DD-WRT. Although the enthusiasm for ad-blocking is more in the Pi-Hole community.

An Indiegogo to provide an existing router with Pi-Hole functionality could come from someone with a very particular set of skills acquired over a very long career :wink:

I added a forum entry to DD-WRT to see if there is any interest :
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=306689

I'd be willing to eventually try installing pi-hole onto a DD-WRT enabled router, however adding a tab and pane is going to be well beyond the scope of what I can accomplish, mainly because pihole is already serving the admin page with lighttpd at whatever.ip.address.is/admin

I'm not sure if anyone of the development team is running a compatible router - I myself use only a very very limited one, but this is fine since I disabled almost everything and let the Pi-hole DHCP do most of the networking magic.

I agree with @sschadwick that a DD-WRT tab would be questionable if it would contain more than a link to the actual Pi-hole admin interface. As one of the core developers on the web interface I can tell you that it would be complicated to keep a customized fork up-to-date.

Ok, no problem I was asking if there is any interest - you shouldnt work on something you dont want to.

I was just thinking what is the most plug-and-play scenario - which to me is you buy a router off-the-shelf with the functionality already built-in, you click a button and your internet is better.

I believe that would make the project more pervasive because quite a high level of technical understanding is required right now (each obstacle lowers the potential number of users), such as :

  1. What is a Raspberry Pi?
  2. What is DNS?
  3. What happens if I dont have any ports left on my router ?
  4. How to configure a router?
  5. Troubleshooting network issues
  6. Understanding of Linux
  7. How to install linux packages
  8. Why being tracked by ad networks is bad?
  9. Will it make much difference to my internet anyway ?

My wife only knows the last one - she complains her games and internet are worse when she is outside using phone data.

You misunderstood me - we are only a handful of people working with the code. We currently have neither the capabilities (because many other things like FTL that we want to see coming soon), nor do we have the required hardware to work on this. I'm explicitly not saying that we are not interested in this or do not like the idea, but it is currently somewhat out of scope for us to look into this.

Having said that, I also have to add that it is unclear how such a device could be brought into the market. I have no experience with the rules of business which would come into our way, but before we could put anything on the market, we would have to be sure to know what we are doing in terms of taxes, etc. Not to mention that our employers might not like to see us doing this. It just sounds undoable for us.

1 Like

It looks like there is a way to get an all-in-one router + Pi-Hole combination right now,
with an expensive and powerful router called the Turris Omnia.

It was an Indiegogo campaign which blew through its funding many times over
and raised $1,223,230 USD

Everyone here might want to check this request out...

https://discourse.pi-hole.net/t/pihole-directly-on-routers-tomato-merlinwrt-dd-wrt-openwrt

It's a request to get pihole running on DD-WRT, Tomato, Asus-Merlin, and other router distro's with a suitable optware

2 Likes

Devs please correct me if i am wrong but wouldn't the limited space ie: no hard drive and very little flash storage be a major limiting factor in natively running the software in a router?

There's more discussion going on in the other thread, but that's one of the concerns I have.

Not a dev, yet let me try to explain and outline the situation:
In general terms, you are right. Most smaller mainstream routers don't have the abilities for this.
However this does not apply for many "pricier" models (e.g. >100 bucks). Especially if they run modified firmware like DD-WRT, OpenWRT.
These routers often come with dual-core processors (around 1-1.5 GHz clock) and often a larger flash storage (e.g. RT-AC68U 128MiB Flash, 256MiB RAM). Plus support for USB attached disk (often with USB 3.0). Software repositories are also available (Entware, Entware-NG). These routers can be turned into customizable and pretty powerful tools.
You can find a lot of solutions/ideas on http://www.smallnetbuilder.com.

Usually, for a router to run optware/entware an external usb is required.

The space, however is not the real concern. The issue is that writing/handling/grepping logs takes more io and cpu resources than one would expect. And since the current design does lots of those things it is really hard on a single core cpu. Even older PIs have trouble keeping up.

i mentioned it in the other thread but my hope is for a division of labor. the ability to ship logs off the pi, so the user can pick where to have the web ui, or to not have it at all