A very simple project that can be completed within 20 minutes and provide a network-wide ad-blocking solution, is using your Raspberry Pi 4 with Pi-hole.
There are numerous articles and guidelines on how to implement the solution. I found the most clear to be the one described on https://pi-hole.net/.
Start by updating your Raspberry Pi, typing the below commands:
sudo apt update
sudo apt upgrade
After updating Pi, you should proceed installing Pi-hole. There are three different scenarios on how to install it; i went with the One-Step Automated Install, which is the most convenient way to deploy it.
To do so, just type the below command:
curl -sSL https://install.pi-hole.net | bash
It will take a minute or two to complete installation. I’d suggest you note down the generated password it provides you, in order to be able to access the admin console (or even take a photo).
Afterwards, you will need to decide whether you will configure your router to have DHCP clients using Pi-hole for DNS, or use Pi-hole as a DHCP Server. The third option, would be to manually alter your device’s network configuration settings by setting Pi-hole’s IP address as a DNS server, in case you do not want to change your network configuration schema.
To be honest, i first tried the last option, verified its functionality and that no disruptions or network sluggishness occurs and after that, i set Pi-hole as a DHCP server. Raspberry Pi 4B/4GB RAM is way capable of serving as a DHCP/DNS server to a home network with 20 network devices.
The first thing you need to do after completing the below, is to upgrade Gravity, in other means, to upgrade the list of Blocked Domains. This can be triggered from the Tools menu, first choice.
You can now browse and explore Pi-hole’s several other options to be configured and if you truly find it useful, to consider donating to the makers. A fair thing to do.