If you’re a die-hard publiphobe, you most likely have already installed one or more ad blockers in your web browser. But ads don’t just intrude in the browser. They also appear in other applications, including mobile. A good way to get rid of it is PiHole, software that installs on a Raspberry Pi and performs filtering across an entire local network.

1. Gather the necessary materials

To perform this installation, you will need the following:

  • a computer with an SD or micro SD card reader
  • a 4 GB micro SD card with possibly an SD adapter
  • a Raspberry Pi with its power supply
  • an Ethernet cable

2. Flash the Raspbian system on the micro SD card

On your classic computer, download the “Lite” version of the Raspian system from the raspberrypi.org site. After a possible decompression, you will then obtain an image file. It has an IMG extension and is approximately 1.8 gigabytes in size.

Then download and install the Etcher software from the balena.io site. It will allow you to easily flash the Raspbian system to the SD card. To do this, slide the micro SD card into its adapter, and all in the SD card reader of your computer. Launch Etcher, select the image file to flash, then select the micro SD card. Then press “Flash!” “. The operation takes a few minutes.

3. Activate the SSH remote access service

For the SSH remote access service to start automatically when the Raspberry Pi starts up, you must create an empty “ssh” file at the root of the microSD card. Make sure your microSD card is still in your computer.

On Windows, type “cmd” in the Cortana search box, then launch the eponymous application. Then, you have to use the following commands:

>:
> NUL type> ssh.

In macOS, launch a Spotlight window (Command + Space keys), write “terminal” then launch the eponymous application. Then, you have to use the following commands:

> cd / Volumes /
> touch ssh

4. Launch Raspbian Lite and login

Take the SD card out of its adapter and insert it into your Raspberry Pi card. Connect it to an Ethernet port on your modem router. When you connect the power to the latter, the Raspbian Lite system will automatically start. Consult the management interface of your modem-router to find out the IP address of your Raspberry Pi. On your computer, open a command window again (cmd on Windows or terminal on macOS) and type:

ssh pi @

The system asks you for a password which is “raspberry”.

5. Install the PiHole software

Now that you are remotely connected to your Raspberry Pi, you can run the PiHole installation script. To do this, just type the command line:

curl -sSL https://install.pi-hole.net | bash

The system will then display a series of configuration screens for which the default choices must be validated each time. Then the installation of the software packages will take place, which may take some time. When the installation is complete, a final screen will display the URL and password to access the PiHole management interface. Note this information carefully.

6. Configure the DNS

PiHole filtering relies on the DNS (Domain Name System). For this to work, you have to make the Raspberry Pi your new DNS server. The ideal is to configure it directly on the box. To do this, you must first make the Raspberry Pi’s IP address static, then indicate this IP address as local DNS. Here is what it looks like on a Freebox.

Unfortunately, some boxes, like those from SFR, do not allow you to customize the DNS. In this case, you must deactivate the DHCP service on the box and activate the PiHole service in the “Settings” menu.

If this manipulation is not possible either, then the DNS server must be configured on each terminal. But that is beyond the scope of this article.

7. View and adjust PiHole filtering

On the PiHole management interface, you will immediately see all the requests that have been blocked or not.

If you don’t like the blocking, you can adjust it by adding domains to the whitelist or blacklist.

However, since filtering relies solely on DNS, it is not possible to disable filtering on a particular site, as is possible with browser extensions. Giving a boost to some sites is therefore unfortunately not feasible through PiHole.





Source link

Leave a Reply

Your email address will not be published. Required fields are marked *