NxFilter is the best free solution for a self-hosted DNS server/filter I have found so far. Today I got my Raspberry Pi, so how about running NxFilter on a headless Raspberry Pi in a family’s home network?
Note: This article is based on a Raspberry Pi Model 2B and NxFilter Version 3.5.1. Never versions of either product may behave differently.
The current Desktop version of Raspbian, the default Debian-based Operating System for the Raspberry Pi already comes with all required packages (Java, unzip, wget)
- Install Raspbian on the Raspberry Pi. You can do this also headless, without an attached Keyboard and Screen, for example by following the official guide on how to install an Operating System on an SD card, or this more generic guide for a fully automated, configured installation.
- Enable SSH
- Connect to your Raspberry via SSH, using the default (or configured) Username/Password.
- Optional: Update Raspbian to the latest version.
- Recommended: Change the default password.
- If you used the lite version of Raspian, you need to install JAVA.
Note: This guide roughly follows the the unix installation instructions from the NxFilter manual:
- Download the latest version of NxFilter with wget
- Unzip to the installation folder (requires root-access)
sudo unzip nxfilter-3.5.1.zip -d /nxfilter
- Change to the installation folder
- Make the necessary scripts executable
sudo chmod +x *.sh
Automatic Startup at each Raspberry boot
- Add the line
/nxfilter/bin/startup.sh -dnear the end of the file
cd /etc sudo nano rc.local
- After doing so, the end of the file should look something like
# NxFilter Autostart /nxfilter/bin/startup.sh -d exit 0
Configuration of NxFilter
- Using another machine with a browser, navigate to http://youripaddress/admin Default Username and Password is admin/admin.
- Change default password via “Config/Admin”
- See the manual for all configuration options.