It’s already easy to block ads for your entire network with 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 🍌).
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.
To prevent a few harmless error messages that happen on the C.H.I.P., enter these commands to enable the en_US UTF8 locale:
apt-get install locales locale-gen en_US en_US.UTF-8 dpkg-reconfigure locales
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.
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.
You can verify ads are being blocked by checking the admin interface in a Web browser. Just navigate to http://<YOUR_CHIPS_IP_ADDRESS>/admin
Love this project? Think it could be improved? Tell us what you think!