I set up a Raspberry Pi 4 Model B as a network-wide ad-blocking DNS server using AdGuard Home. Using NOOBS (New Out Of Box Software), I installed Raspberry Pi OS Full (32-bit) onto a microSD card. To access the AdGuard Home web interface after installation use a web browser on any device connected to the network and navigate to http://<Raspberry_Pi_IP_Address>:3000 to complete the setup. AdGuard Home functions as a DNS sinkhole, redirecting ad domains to a black hole and preventing devices on the network from connecting to ad servers. The key step was configuring my router's DHCP (Dynamic Host Configuration Protocol) settings to assign a static IP address to the Raspberry Pi and set it as the primary DNS nameserver for all devices on the network.
To install AdGuard Home, I ran the following command in the terminal: curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
The Raspberry Pi is housed within a case, with heat sinks attached to the CPU and other components for cooling. A fan is mounted on the case's top to maintain optimal temperatures.
The Raspberry Pi is powered via a USB-C cable (bottom right) and connected to a monitor using a micro HDMI cable (above the power cable).
Accessible at http://<Raspberry_Pi_IP_Address>:3000, the AdGuard Home interface allows for easy configuration of the DNS server settings and monitoring of network activity.
To verify the effectiveness of the ad-blocking DNS server, I used the Ad Block Testwebsite.