C.H.I.P. and Pi-hole Gets You Network-wide Ad Blocking for $9

It’s already easy to block ads network-wide with the Pi-hole on a Raspberry Pi, but now you can do it for even less money by running it on a C.H.I.P. microcomputer, which you can buy for $9.  There is a little bit of manual work to get it on the network since it doesn’t come with an Ethernet port.  You also need to install the curl command, but once you do those two things, you can use the same installation command that you use for the Raspberry Pi.

Note that it is possible to flash your C.H.I.P. with Debian, but you need a jumper cable.  So this walkthrough assumes you have just the basic $9 C.H.I.P. and nothing else (well, maybe a banana 🍌).

Setup Pi-hole On Your C.H.I.P.

First, you will need to connect your C.H.I.P. to the network and set a static IP.  You don’t need an Ethernet cable for this to work.  And if you followed my guide, you will already have SSH and VNC enabled, so you can run these commands locally, or over ssh if you prefer to copy/paste.

First, install curl, which you will need to run the installation script.

apt-get -y install curl

Then, run the Pi-hole installation command:

curl -L install.pi-hole.net | bash

Make sure you pick wlan0, which will be the interface you already set up when you connected to the network earlier.

You can verify that this is the correct interface by opening the network settings from the GUI.

Once you get to the screen asking if you want to use your current settings as a static address, choose Yes.

If you choose no, the installer will try to make /etc/dhcpcd.conf, which the default C.H.I.P. OS does not use (because it uses Network Manager and nmcli).  It might cause weird stuff to happen; I don’t really know.

Let the installer finish.  You will see some errors at the end, which you can safely ignore.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

This has something to do with the small snippet of perl that is used in the whitelist and blacklist scripts.  Even though these warnings appear, the script seems to execute just fine.

Now, just set your devices to use the C.H.I.P. as their DNS server, or change the setting in your router so all of your devices will block ads automagically when they connect to your network.