Arm your new router with total Internet protection. It’s called Pi-Hole.
Arm your new router with total Internet protection. It’s called Pi-Hole
Every year there is more junk, ads, and potential threats to users on the web. Protecting yourself from constant surveillance and removing unnecessary things from the pages you visit is becoming quite difficult.
Now we are going to talk about a solution that is gaining popularity called Pi-hole.
pi hole – is a special Linux-based build that allows you to block ads and save sensitive data while browsing the web. The blocking takes place at the DNS level and allows for flexible configuration of the prohibited resource lists.
The build was originally developed to run on Raspberry Pipe single board computers, but it is now possible to install it on any Linux computer.
Pi-hole can fight against banner ads, all kinds of spy scripts and web applications that spy on the user. All this allows for faster page loading and reduced traffic, which will be useful for limited connectivity.
what will we need
Of course, our beloved Malinka single-board computer:
▸ Raspberry Pi 3 – from 2536 RUB.
▸ Raspberry Pi 4 – from 3065 RUB.
Choose a model with a box and power supply. Most smartphone chargers may not fit.
Only three versions of the third and fourth fit (Raspberry Pi 3A+, 3B+ and 4B) that are equipped with a Wi-Fi module that is compatible with the ac standard. “The Malinka will work on the home network and help filter traffic, for which it must support all common wireless data transmission standards.
You will also need a microSD memory card from 2GB. Surely you have some old flash drives from cameras or Android mobile phones on your desktop. Even a gigabyte card will do, if you install the system without a graphical shell.
How to set up a Pi-hole on a Raspberry Pi
1. Download a Raspbian operating system image from the official website.
Better choose the Raspbian Buster version with desktop to get a system with a graphical interface and a desktop if necessary. Otherwise, all device manipulation will have to be done via the command line.
2. Download and install the Etcher app to write the image to the memory card.
3. Connect the microSD card to the computer. Yes, there may be some difficulties here. Most modern Macs will need an external adapter, and perhaps an SD to microSD card adapter as well.
4. Writing a Raspbian image to a memory card using the Etcher application.
5. Install the card in the Raspberry Pi and connect the Raspberry to the network.
Next, we’ll need to determine how to control our single board. If you have a USB keyboard and monitor, you can display an image on the screen, or you can SSH in and configure the system remotely.
You can read more about how to control the Raspberry via SSH in this article.
To activate SSH you must:
▸ On the memory card with the Raspberry Pi image written on it, locate the Boot section.
▸ Create an ssh file in it with no extension.
▸ Install the card in the Raspberry, once loaded SSH will connect.
▸ For the initial configuration, you will need to connect the Raspberry to the router using a network cable.
6. В Terminal in Raspbian or in Terminal on the computer when connected via SSH, enter the command
7. In the section. Network Options Set up Wi-Fi if you connected via cable first.
Please note that to connect to a 5GHz network, you need to go to Network Options – Change Wi-Fi country and specify the region USA. Otherwise, the system will only see 2.4 GHz networks.
8. In your router settings, configure the Raspberry with a static IP address.
9. Run the script on the “malinka” to install the Pi-hole command:
sudo curl -sSL https://install.pi-hole.net | bash
10. In the installation process, select the DNS server of your ISP. You can stop at Google or OpenDNS and select the suggested address lists to block content.
eleven. You agree to install the web interface.
12. In the last step, memorize the generated access password.
13. After completing the process in the browser of your computer or mobile phone, go to: http://ip-адрес-малинки/admin and log in with the obtained credentials.
How to drive traffic through the Pi-hole
For the system to work, you must configure DNS query filtering. For this it will be necessary to use the Malinka configured as local DNS server.
This can be done for all the devices on the network by configuring only the home router, or for several devices by configuring the parameters on each of them.
How to configure DNS on your router:
1. Go to the web interface of the router.
2. In the DHCP settings section find the parameter DNS server.
3. Enter the IP address of our Malinka.
4. Save the configuration and reboot the router.
How to set up DNS on iOS:
1. In the iPhone or iPad settings, go to Wi-Fi.
2. Press the “i” indicator next to the wireless network in use.
3. In the section. Adjustment of the DNMode selection S Manual.
4. Specifies the IP address of the “Malinka”
How to configure DNS in macOS:
1. В System settings open section Network.
2. Highlight the current connection and press the Advanced… button
3. On the DNS tab, add a new address.
4. Enter the IP address of the “Malinka” on the line.
What do we do now?
The Pi-hole system is initially configured to block common advertising IP addresses in English and in our realities it will be practically useless. You will notice the effect when you visit foreign sites like Amazon or Ebay.
You will need to manually add appropriate block lists to extend the features.
Here everything depends on your needs. You can configure Pi-hole to block ads, disable tracking of user’s online activities, or remove malicious and unsafe scripts from pages.
Blocked address lists must be kept current and updated regularly. Each of you can find the right lists on your own and add them using this algorithm:
1. Access the Pi-hole web interface through the browser of your computer or mobile phone.
2. Open the Blacklists section.
3. Insert a link to the block list and add it.
4. Restart Pi-hole from the Settings menu.
Here are examples of block lists for different purposes:
▸ rules for blocking advertising content
▸ rules to block youzerbars, social media and other unnecessary content on web pages
▸ List of blocked trackers and tracking scripts
▸ Ban blocking to view websites with AdBlock plug-ins
There are many other block lists available on the internet for different purposes.
In addition to Pi-hole, a VPN would be a good idea, but that’s a topic for another article.
? Do you want more? Subscribe to our Telegram.
Mark it in your favourites.