The goal is to fully replace Pi-hole with a FreeBSD-based solution, including a user interface and logging.
Through this project, I hope to deepen my knowledge of working with “servers” and FreeBSD in particular.
While Pi-hole is a great out-of-the-box tool, I believe I’ll learn much more by manually installing and configuring DNS and DHCP.
As preparation, I looked into the differences and advantages of FreeBSD compared to Linux.
For simplicity, I’m skipping trivial installation steps here and focusing instead on the problems and successes I encountered during this project.
I downloaded and extracted the FreeBSD 14.0 image.
At first, I ran into issues flashing the microSD card using dd, possibly because the 128 GB card was too large due to FAT formatting. This was resolved with the Raspberry Pi Image Builder.
After booting, the keyboard didn’t work, so login wasn’t possible. Even reflashing with an older version (13.2) didn’t help. I assumed it was a driver issue. Since I didn’t have a second keyboard, I decided to set it up headless via SSH.
I installed and configured Unbound.
After reboot, the system lost connection due to a misconfigured IP and wrong interface. Without direct access to the Pi, I reflashed and reinstalled FreeBSD.
You fail, you grow.
After reinstalling, everything worked as expected. ✅
The ad blocker works by redirecting DNS queries for ad domains to nowhere, so ads never load.
For this, I used the StevenBlack host list: https://github.com/StevenBlack/hosts
Initially, I had issues with curl, but after switching to another source the problem was solved.
Once integrated into Unbound, the blacklist worked correctly.
To ensure that every new device in the network uses the Unbound DNS server, I set up a DHCP server that provides this information.
During configuration, I made sure to assign static IPs to my router and a second Raspberry Pi (MAC addresses altered).
Before starting the service, I tested the configuration file for syntax errors. Finally, I enabled it in rc.conf so that it runs on boot.
Testing on a client device was successful. ✅