Blocking ads on your local network is really straightforward with a raspberry pi all you need to do is install some software called Pi-Hole on it and then make sure you use the Raspberry Pi as your DNS server instead of Google (22.214.171.124) or Cloudflare (126.96.36.199) directly. You can still use those, but they will be the upstream of your Pi-hole instance instead. Later on you can dive into this article where I actually integrate a DNS Proxy service called SmartDNS into Pi-Hole which enables me to block ads and get BBC iPlayer outside of the United Kingdom and the full US Netflix catalog.
What you will need: (a router, computer and internet goes without saying…)
You can buy a Raspberry Pi from these places depending on where you live:
If you live in the United States or in the United Kingdom:
Raspberry Pi Kit (includes a case, a memory card, power adaptor and the PI itself) from Amazon this is the one I used in the tutorial, very neat set up.
If you live in South Africa:
Note: Shop around on classified sites as well for a second hand raspberry pi, you will see people buy this computer thinking it will change their lives and then not realize its just a normal small form factor PC, it cannot do anything without you programming it to do something and then people end up selling it at half price. In other words, check gumtree, check craig’s list and Ebay, there are bound to be a lot of specials on second hand Raspberry Pi computers.
We will be installing the Raspberry Pi OS (previously called Raspbian) as this is the primary operating system which the Pi Hole Devs test their system against followed by Ubuntu and Debian.
On a high level, this is what we will do: We are going to download the operating system and we are going to download a program that can write that OS to the physical memory card using your USB memory card reader. Once that is done you will put the memory card into the Raspberry PI and connect to it via a LAN cable from your PC (this is a headless installation – meaning you won’t plug a keyboard or monitor into the raspberry at all.) and then run the setup scripts to install Pi Hole which we will then control via the browser.
Let us get started
We are specifically going to use “Raspberry Pi OS (32-bit) Lite”, which you can download from here. After you downloaded this, please download the software required to write it to the SD card, called Raspberry Pi Imager from here.
Connect an SD card reader with the SD card inside.
Open Raspberry Pi Imager and choose the required OS (Raspberry Pi OS lite, 32 Bit) from the list presented.
Choose the SD card you inserted into your computer via the USB card reader in order to write the image to it.
Review your selections and click ‘WRITE’ to begin writing the data to the SD card.
Note: if you are using the Raspberry Pi Imager on Windows 10 with “Controlled Folder Access” enabled, you will need to explicitly allow the Raspberry Pi Imager permission to write the SD card. If this is not done, Raspberry Pi Imager will fail with a “failed to write” error.
Now you need to create a file called “ssh” without and extension and place it inside the boot partition. If you go to “This PC” on your windows machine and look at the SD card you will have two partitions. The first one, which is the smaller one, is the boot partition. Place the file into this one.
We do this because when the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.
You can now insert the SD card into the Raspberry Pi and power it up.
Plug the lan cable into your raspberry and plug the other part into your router.
In a web browser navigate to your router’s IP address e.g. http://192.168.1.1, which is usually printed on a label on your router; this will take you to a control panel. Then log in using your credentials, which is usually also printed on the router or sent to you in the accompanying paperwork. Browse to the list of connected devices or similar (all routers are different), and you should see some devices you recognise. Some devices are detected as PCs, tablets, phones, printers, etc. so you should recognise some and rule them out to figure out which is your Raspberry Pi. Also note the connection type; if your Pi is connected with a wire there should be fewer devices to choose from.
If you struggle with this step, follow me on Twitter (@ErikThiart) and send me a tweet with a picture of your router then I will explain how to do it for your particular router.
Alternatively, you can get the IP address of a Pi using your smartphone by downloading the Fing App. Your phone and your Raspberry Pi have to be on the same network, so connect your phone to the correct wireless network.
When you open the Fing app, touch the refresh button in the upper right-hand corner of the screen. After a few seconds you will get a list with all the devices connected to your network. Scroll down to the entry with the manufacturer “Raspberry Pi”. You will see the IP address in the bottom left-hand corner, and the MAC address in the bottom right-hand corner of the entry.
Download & Install Putty. It is not really an Install as you can run the putty.exe directly.
Enter the Raspberry Pi IP address, select SSH as connection type and under the menu item “Window” –> “Translation” select UTF-8
Click “Open” and you’re ready to log on.
Next you will be prompted for the password for the user as which you are trying to connect: the default password for the pi user on Raspberry Pi OS is raspberry. For security reasons it is highly recommended to change the default password on the Raspberry Pi.
You will see the following:
pi@raspberrypi ~ $
You are now connected to the Raspberry Pi remotely, and can execute commands.
This bit is the easy part. Their intelligent, automated installer asks you a few questions and then sets everything up for you automagically.
Type in the following command into the putty terminal after you logged into the raspberry pi and press enter:
curl -sSL https://install.pi-hole.net | bash
Follow the steps that will come up on the screen, they are mostly very easy to understand, send me a tweet if you get stuck.
Configure your router’s DHCP options to force clients to use Pi-hole as their DNS server, or manually configure each device to use the Pi-hole as their DNS server.
Log into your router’s configuration page and find the DHCP/DNS settings. Note: make sure you adjust this setting under your LAN settings and not the WAN.
Important: If you have existing network devices on your network when you make this change, you will not see ads getting blocked until the DHCP lease is renewed. You can usually force a renewal by restarting the device.
Again, if you need help during this step, tweet a picture of your router to me on @ErikThiart and I will guide you through the process for your particular router.
You can access it by typing the IP address of your Raspberry Pi into your browser. In addition to blocking advertisements, Pi-hole has an informative Web interface that shows stats on all the domains being queried on your network. They also include an API for extending these stats.
Queries are stored in a database and can be queried at any time. It allows you to learn about what’s happening on your network over time for example if you have an Amazon Alexa or Google Home Mini you can check if they are listening to you by eavesdropping into your private conversations.
If you found this guide to be useful and would like to make a donation, please head over to my donations page, I appreciate all the support I have received over the years from various readers around the world.
You probably know the Sonoff brand for smart home electronics like the POW R2 or the Sonoff Basic switches, but they also released a security camera, the Sonoff GK-200MP2-B. I decided to try it out and made an in-depth review so you can make the right decision. Considering this is Sonoff, a well-known brand for robust electronics. I expect a good working, premium product that just works especially since to use the Sonoff GK200MP2-B, you need the eWeLink application which integrates very well with other Sonoff devices.Read The Article
First thing to understand is that on the hidden web, you do not know about a website unless that website is shared with you. The dark web’s content on the internet isn’t accessible through traditional browsers or standard browsing technology. Content on the dark web is designed to be hidden from search engines and from casual users – you can’t simply stumble across dark web websites by accident.Read The Article
Sonoff Pow R2 is a 16A WiFi smart light switch that allows you to remotely manage and control your appliances and monitor your home energy usage. The WiFi light switch works like a power monitor, which allows you to keep track of 99% accurate real-time current, voltage and power on your app.Read The Article
The Sonoff lightbulbs are very affordable and provide you with the basic functionality that a smart home needs. If the budget is tight and you don’t need all bells and whistles of the more expensive lights, Sonoff lightbulbs will do the job just fine. The prices start from $9.90 for the (plastic, White + color temperature) B02 B A60 and $12.90 for the fancy, pear-shaped B02-F-ST64 (glass, retro look, White + color temperature). As far as connected lights go, the prices are very attractive and Sonoff lightbulbs indeed are as inexpensive as you can get.Read The Article
The following mikrotik firewall rules will force all the clients on your local network like your Sony PlayStation and Google Chromecast to use your Pi-hole or your own local server as their primary DNS server, even if they have hard coded their own DNS servers we do this because many apps and devices do not use the offered DNS servers per DHCP, they are just that – an offer. Hardcoded DNS servers will still resolve and allow ads and tracking unless we use NAT rules that will redirect all DNS requests, no matter where they go, to the Pihole.Read The Article
There are plenty of web hosting providers out there, and it may seem difficult to decipher the good from the bad. So I have put together a guide on how to find the right web hosting provider for your business and my personal recommendation of who to use depending on where you are in the world. Teaming up with the right web hosting service is more important than you think. It’s a partnership. Opt for the wrong one and you could find yourself struggling to get support, suffering downtime, or worse.Read The Article