Internet advertisement can be troublesome sometime, especially, if you’re a non-techie person and tend to use free alternatives such as adblockers designed for browsers to block advertisement for you. Internet advertisement also allows content-creators or bloggers to earn some revenue to support their development to provide a better content for you. However, these come with a few risks where, the credibility of the developer who developed the adblockers is still questionable. There are a few adblockers participate in an acceptable ads program by allowing a few ads to pass through as the developer of the program has to earn some money to support their development. Enthusiastic developer focused more on providing a safer program designed to not only block the advertisement but, also to reduce the amount of tracking from the spying eyes.
What if I tell you, you can setup your own internet advertisement black-hole for less than RM 400 (est. ≤ $100) with you being the sole person to manage, and protect your home device from being targeted by the advertisers out there? This is where, the Pi-hole comes in. In general, a Pi-hole is a DNS sinkhole that filters advertisement without requiring to install any client-side software. This method is way different compared to setting up Diversion on ASUS router that receives RMerlin‘s touch.
Of course, there are a few prerequisites has to be considered. The minimum requirement of installing Pi-hole of having a minimum of 52MB of free space in your SD card and 512MB of RAM. The Pi-hole further can be installed under any of these following operating system:
|Raspbian||Stretch / Buster||ARM|
|Ubuntu||16.x / 18.x||ARM / x86_64|
|Debian||9 / 10||ARM / x86_64 / i386|
|Fedora||31 / 32||ARM / x86_64|
|CentOS||7 / 8||x86_64|
If you’re an expert in computer, you can also run the Pi-hole in a container or deploy the Pi-hole to a supported operating system (refer to Table 1) via the provided automated installer by the developer. Each successful purchase of Raspberry Pi comes with pre-installed system image or an OS image that you can select, similar to how you install a standard Windows operating system just by selecting the version you need.
The Raspberry Pi unit that I have with me is the 4GB version that comes with a complete set before assembled by me for first use. I will be sharing the steps required in order to get the Pi-hole online below. But, before that, there are a few simple keys you should know before proceeding. I’ve listed three-required keys to ease the installation process for the better understanding, especially for novice users since you have to use only keyboard to do so.
- Enter = OK / Cancel (if the option given)
- Arrow key = Hover through the options
- Spacebar = Select / Deselect
We are ready. Let’s dive into the process of setting up Pi-hole.
In your terminal window, key in, “curl -sSL https://install.pi-hole.net | bash” command. The installation process will begin once the system acknowledges the command. This is the easiest and quickest way of installing Pi-hole. Alternatively, there is another way of doing so by cloning the repository and run it.
A message will be shown by the installer inside the terminal to let you know that the installing process will take place once you pressing on the ‘enter’ button.
You can opt to donate for the development of the project at the given link to show the appreciation towards the developer that provide us a solution that is very useful especially to protect ourself from trackers and advertisers.
The next procedure requires a static IP. This means that, you can set your preferred IP or you opt for the pi-hole to automatically assign IP for itself.
You can use the arrow key on your keyboard to pick your own preferred DNS provider. I’ve personally picked Cloudflare as my preferred DNS provider. Another advantage of picking a right DNS provider is the pi-hole allows you to set your own custom DNS provider address.
Pi-hole also allows you to pick if you want to use any of these third-party blocking list and I would strongly suggest to select everything for better ad-blocking performance.
In this part, you can select to block advertisement over IPv4 or IPv6. I pick on both since I am using IPv6 as well.
Ignore this message and proceed to the next process. It is just a friendly reminder, if in the future, if your router accidentally assigns another IP address for the Raspberry Pi or you accidentally factory set your router, you still have to manually assign the IP picked/provided automatically by your router in the Figure 5, above.
It is advisable to leave the web admin interface option as on. If you’re professional network administrator, you can turn off the admin interface by picking off option. But, to be on the safer side, leave the option as on.
After enabling the web admin interface in Figure 10, it is recommended to leave the option as on to install the web server which will be used by you to access the dashboard of the pi-hole, later.
The system will ask you to either keep logging the traffic (requests made by your device to access to a site) or turn it off. This option can leave it as on. If your only intention to block the ads, you can turn this feature off. This feature later can be turned on, over the dashboard.
If you enabled the logging query previously, this is the option to allow you to select the privacy mode via the given options. I personally would like to analyze and record the sites visited by the connected clients in my network for the purpose of troubleshooting and protection against accessing to unwanted sites.
Once picking your preferred privacy mode has completed, the system will proceed to install the settings required by default to allow the pi-hole to perform as router-level-adblocker. This will consume a few minutes.
After a few minutes, the system will show that the configuration has been made and you’re ready to access to the internet. Do note that, you have to use the static IP assigned to the Raspberry Pi in the Figure 5 as the DNS server in your router or if your router does not support responding to the configured DNS server, you can turn off the DHCP server in your router and opt to use Pi-hole’s DHCP server. The only difference between those two is, allowing the Pi-hole handles all the DHCP IP allocations allows a more detailed traffic activity of the device in your home network. Also, the password required to login to web admin interface given as well. You will be needing to enter the static IP of the Raspberry Pi, i.e. 192.168.0.xxx or 192.168.1.xxx. You also can view the interface simply by keying in “http://pi.hole/admin“. You can set this either in your wireless router or individually in each client device.
It is recommended to always update by keying in, “pihole -up” command in the terminal once in a week just to make sure the system runs on the latest revision. Do note that, you’re still required to use reputable adblockers such as UBlock Origin and Privacy Badger for extra protection. Another friendly request is to allow your favorite bloggers to earn some revenue by whitelisting their sites to allow the ads to pass through. Raspberry Pi 4 is available in major e-stores like Lazada and Shopee. I would suggest to buy with a set instead of buying parts by parts.
Source: Pi-hole Documentation.