Raspberry Pi Uncategorized

A Web Interface For The Ad-blocking Pi-hole

Anon has generously created and shared a demo of a Web interface for their version of the Pi-hole.  It is the same concept: using dnsmasq and a Web server to block ads.  What’s different is that it runs via PHP and uses a database to store the entries so it can be modified from within a browser.  The project is up on Github, and I hope to collaborate to eventually create a Web interface for the Pi-hole.

The demo site displays a nice table of all of the ad-serving domains that are blocked.  It also shows if the domain was blocked as part of the auto list or custom list.  The checkbox allows you to block/unblock the domain.pihole-webgui-list

You can sort them in different ways.


There is also a nice status page where you can see stats and even restart services or update the list.


6 replies on “A Web Interface For The Ad-blocking Pi-hole”

Hello, I have the AdTrap and call those guys when I have problems and I have been having a lot of server resets. My router, Asus RT-AC68U running Merlin 374.43_2 firmware thinks it has more than one login under their autoproxy setup. REGARDLESS….it works SOMEWHAT and I have one of the first one’s when they started to ship them after their kickstarter campaign and I could get it online. Now the box is kinda of a problem. They have it setup to always (every 1-2 minutes) ping a server, that is in California, for a .jpg file so it can “see” if it has a internet connection. WHY do I always need to be connected to these people?
I WANT really bad to try this Pi Hole out
Here on Amazon
Will this work?
Will it be hard to setup?
Can I point my router to the static IP address I assign (by MAC address) of the Pi to use it as FIRST DNS query then goto the other IP addresses I have as DNS lookup?
Will this take IPv6 requests and compare it to a list of IPv6 addresses?
Crapcastic (Comcast) gives me IPv6 addresses and this is the wave of the things to come.
I also have IPv4, like everyone…..
the IPv6 thing is not so important as is this a good kit to get and will it work as DNS query from the router, so I don’t have to try to setup all devices in my house, which I have between 12-26 devices connecting at one time.
Does it have enough power to handle it?
The AdTrap, I feel, does NOT have enough power and the lag time makes browsing impossible sometimes and I just unplug it.
I hope I get a email when this is replied to, because I would like to do this as soon as possible.

You don’t have to get a raspberry pi to test pi-hole dnsbloker system. One can easily setup a VM in virtual-box and select bridge network adapter. Bridge adapter will fetch a second ip from your router and act as if it is a another PC on your network. Setup a basic Ubuntu server on it. install dnsmasq and lighttpd on it. follow the setting up instruction from pi-hole post. Ones you have everything setup and running, modify your router DHCP settings to issue the VM’s IP as primary DNS address. Then disconnet and reconnect any given test device on your network that uses DHCP. it will get an IP from your router and VM’s IP as Primary DNS server. It will automatically send all DNS request to your VM first, before it uses the secondary. if everything test out and work out well, then you can think of getting the RPI and making it a permanent solution for the network. The reasons for doing above is to explore the DNS Ad Blocking system before you apply it as a solution. DNS Ad Blocking is no where near as perfect as browsers AdBlock Plus Plugin or some Proxy base solution. The reason being, a domain (say can serve both content and Ads from the same url address. And DNS Blocker will not be able to tell them apart. however, most Ad server seems to use their own domain name or subdomain name for now. and that make the DNS Adblocking somewhat possible. As an example seems to serve both youtube content and youtube video ads. So far I could not find a way to block the ad and not block youtube video. But if you use Adblcok Plas Addon on browser, its easily blocked those video ads. But not all device allows browser plug-ins. Specially mobiles and tablets. Thats where DNS Blockers comes in. As you said Adtraper uses proxy solution, I will guess that will automatically make it more effective then DNS base blocker. But DNS blockers are easier and cleaner. if you Adtrapper $hits itself, then you lose Internet in all device, as the proxy itself failed. but if DNS Blocker fails to respond, you device will automatically use the secondary dns and continue happily. so as you can see DNS blocker is completely transparent to your network device and Internet connection will itself not fail due to DNS Blocker not being present in the network. This is the most attractive thing about DNS base blockers IMHO.

True, blocking an entire domain will not always work because one domain could serve ads as well as legitimate content. However, it should be possible to sniff packets to determine where ads go and then create a rule in lighttpd to account for this. This is how someone was able to block Hulu video ads.

I would love to try this out BUT I don’t have any VM on my Mac OS X 10.10.3
So I gotta go that first
the Adtrap use privoxy BUT and it blocks the youtube ads and most everything else BUT it has problems and it’s annoying
so I thought if I drop $60 for Pi2/Case on Amazon and do this install on it, have it and the Adtrap running at the same time maybe that would help
I post a lot in the adtrap forums ( and such BUT it is a user forum, basically never get input from these guys and sad to say, it’s not very many people working there ( bought the guys kickstarter biz) so getting them to realize that there is a lot of network traffic between Miami,FL and Southern California and they have the Adtrap always calling out to a server there in California, that’s one reason it hangs all the time.
So the Pi2 may help
It is mostly for my kid, she uses her iPad and Android phone a lot for her school work, playing games,etc and I don’t need a pre-teen getting ads for Viagra or Cialis for when the moment is right..
I use ABP/Flashblocker and Ghostery on my FireFox browser
My wife likes to go to which tries to put malware on your computer as a flash upgrade BUT if I have the Adtrap plugged in, you never see that come up
It does good but it’s like 78% solution to the problem and I want 99.999%
I hate ads in the middle of something I am reading on my iPad and ESPECIALLY if it’s animated

Can the Pi2 run PRIVOXY?
Can the Pi2 run some version of Ad Block Plus browser plug in (which always updates it’s filters) and act like a “firewall” kind of device/proxy? That is what the Adtrap does, acts as a firewall on Port 80 ONLY, so https ads still get thru and so do ads on apps (probably because they don’t use port 80 to connect to the net to go to the adsense ad servers)

I like to discuss this but in this post, don’t know if this is the right place…
I just want it to be like it was back in the early 90’s….no pop up bullshit and you actually got to read/learn stuff, not get inundated with ads for penis enlargements or low cost medical insurance.

Reports from users say that ads get blocked in apps. It still has trouble with Hulu/YouTube video ads though. But I am working on that (development is slow because I don’t get paid for it).

I installed Privoxy on the Pi a while back, so it should work. You can contact me directly if you want to discuss it over email.

Hi, any news on this feature? It’d be amazing I think to use, tried downloading but it seems a work in progress 🙂

Leave a Reply