Nicolas314

All my geeky stuff ends up here. Mostly Unix-related

Ad Blocking Appliance

with one comment

BH_LMC

Finally found some use for this Raspberry Pi B (version 1) I had lying around taking dust: an ad blocker for the whole household! Yay!
The whole thing took me less than an hour to install and no time at all to setup. You download and burn a DietPi image to an SD card, insert it into your RPi, and boot. Log through ssh as root and follow the instructions. Let it download black lists from the net and you are ready to go.
All machines on my network are now set to use the RPi address as DNS. This works furiously well it is nothing short of amazing! Spotify without the ads, Android apps without annoying popups and ads. Things just work out of the box. I wish I had found this earlier.
Oh, and if you do not want to dedicate a Raspberry Pi for this, you can always install the package separately on a Debian box, but you need to leave it running 24×7.

The author explains how it works in a dedicated blog post, but to put it in a nutshell here is how it works:

  • Pi-hole provides a script to aggregate lists of known ad sites: gravity.sh. Run this every once in a while.
  • Pi-hole uses dnsmasq, a lightweight DNS server. The pi-hole instance is set to use the list from gravity.sh as a black list.
  • Pi-hole sets up a local web server answering all queries with a blank page. You also get a local (PHP) web site giving you statistics about number of blocked domains.

Best use I have ever had for this tiny box so far!

Links:

 

Advertisements

Written by nicolas314

Sunday 29 November 2015 at 11:52 pm

Posted in hardware, raspberrypi, router, seo

Tagged with , ,

One Response

Subscribe to comments with RSS.

  1. Hi Nicolas.

    It looks like you have just bought a Raspberry Pi and discovered the endless usage of this fantastic device.

    I also use a Raspberry Pi to host services, a Python runtime in my case. Hosting static or PHP pages is fair easy and cheap, but Python web apps is more complex. A few thoughts about it there:

    http://arnaudbertrand.com/blog/2015/05/12/simple-python-app-hosting-raspberry-flavor/

    So I’m currently hosting my game of life on it:

    http://arnaudbertrand.com/blog/2015/05/12/simple-python-app-hosting-raspberry-flavor/

    The game is a bit slow, this is not due to the code running on the browser. I also host a python notebook server, for private use.

    The RPi is also running NGINX which is used as a reverse proxy for additional web services, like the web interface of my NAS. This ad-blocker appliance is a really good idea either.

    Will be happy to read what you will do with it next!

    Ar.

    Arnaud

    Wednesday 2 December 2015 at 11:15 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: