Running NxFilter on a headless Raspberry Pi Zero W

Note: This post is mostly a revisit of my older post Running NxFilter on a headless Raspberry Pi, using the Zero W model and the current NxFilter version.

NxFilter is the best free solution for a self-hosted DNS server/filter I have found so far. Today I am going to try whether it runs on the tiny Zero W model. This uses WiFi and may not be the most performant solution, but allows you to place your DNS server literally anywhere in your house.

Prerequisites

You will need to set up your Raspberry for headless operation first, except VNC. (Choose the “desktop” version as it includes JAVA).

Installing NxFilter

Note: This guide roughly follows the  the unix installation instructions “using ZIP” from the NxFilter manual:

  1. Download the latest version of NxFilter with wget
    wget http://www.nxfilter.org/download/nxfilter-4.3.5.4.zip
  2. Unzip to the installation folder (requires root-access)
    sudo unzip nxfilter-4.3.5.4.zip -d /nxfilter
  3. Change to the installation folder
    cd /nxfilter/bin
  4. Make the necessary scripts executable
    sudo chmod +x *.sh

Manual Startup

  1. Run
    sudo ./startup.sh

Automatic Startup at each Raspberry boot

  1. Add the line /nxfilter/bin/startup.sh -d near the end of the file /etc/rc.local
    cd /etc
    sudo nano rc.local
    
  2. After doing so, the end of the file should look something like
    # NxFilter Autostart
    /nxfilter/bin/startup.sh -d
    exit 0
    
  3. Reboot
    sudo reboot

Configuration of NxFilter

  1. Using another machine with a browser, navigate to http://youripaddress/admin Default Username and Password is admin/admin.
  2. Change default password via “Config/Admin”
  3. See the tutorial for all configuration options.