As I am sure my regular readers are aware I am a huge fan of Pi-hole, the Raspberry Pi
based network wide ad-blocker. Well recently we got an exciting new feature with NXDOMAIN and NULL Blocking. This new feature gives us two different blocking modes (NXDOMAIN and NULL) and can have a huge impact on your ad-blocking. Before we get into how to implement these new modes lets give a brief explanation of what they are.
First let’s take NXDOMAIN (or Non-Existent Domain) is a DNS message received by the DNS resolver when a request to resolve a domain is sent to the DNS that can not be resolved to an IP address. Basically, it is a message received that says the domain does not exist. With NULL blocking on the other hand the response is a special IP address such as 0.0.0.0 which is an Unspecified Address. Both NXDOMAIN and NULL Blocking can improve your network speed but are at this point experimental in Pi-hole. I was already running a beta version of Pi-hole, so this was not an issue for me. If you are not comfortable with this, you may want to wait for a stable release with these features.
For those who like to live on the bleeding edge let’s get everything setup.
First what will you need?
- Raspberry Pi 3+B (nice to start with a kit as they will typically include a case and power supply)
- MicroSD Memory Card
- Micro USB Power Supply
- Raspberry Pi Case
To begin the installation process you will need a MicroSD Memory Card, and the ability to format and burn an image to that MicroSD Memory Card. I am sure most of you know how to do these steps already, but I will give my recommendations, for formatting I prefer to use SD Memory Card Formatter for Windows and to burn the image Etcher.
Memory Card Preparation:
- Insert MicroSD Memory Card into a computer
- Open SD Memory Card Formatter for Windows
- In SD Memory Card Formatter for Windows Select the Drive that corresponds to your Memory Card
- In SD Memory Card Formatter for Windows Click Format and wait for it to finish
- Download the Raspbian disk image from https://www.raspberrypi.org/downloads/raspbian/
- Open Etcher.
- In Etcher Select the previously Downloaded Image
- In Etcher Select the Drive that corresponds to your Memory Card
- In Etcher Click Flash and wait for Etcher to Finish
Raspberry Pi Setup:
- From the Raspbian Desktop launch Terminal
- From Terminal install Pi-hole using the following command
curl -sSL https://install.pi-hole.net | bash
- When the installer finished we need to switch over to the FTLDNS beta by running the following commands in Terminal
- echo “FTLDNS” | sudo tee /etc/pihole/ftlbranch
- pihole checkout core FTLDNS
- pihole checkout web FTLDNS
- Once you are on the FTLDNS beta branch you will need to edit the pihole-FTL.conf file by running the following in Terminal
- sudo nano /etc/pihole/pihole-FTL.conf
- In the pihole-FTL.conf file enter one of the two options below
- Press ctrl-x to close out of nano
- Press y to save the changes
- Press enter to confirm the file name
That’s it you are now up and running. I have only been playing around with this a little bit as it is new but so far NULL Blocking seems to have made a noticeable increase on speeds.
What do you think of these new blocking modes? Anyone experiment with them yet? Let me know in the comments below.
I am passionate about the IoT and connected devices. Using connectivity to automate our lives will empower civilization to achieve greatness.