Turn Your Raspberry Pi Into a Local DNS Server!

By | March 3, 2019

If you have a raspberry pi, you can turn it into an ad blocker, tracking blocker or porn blocker DNS server by installing Pi-Hole. You must have to install an OS. In my case, I am using Raspbian Stretch Lite as I use my Raspberry Pi 3 B+ as a local server. I would recommend you to install Rasbian as it’s Rasberry Pi’s official OS. You also can install one of the pi-hole supported OS.

Hardware Requirement
  • ~52MB of free space
  • 512MB RAM
Supported Operating Systems:

The following operating systems are officially supported by pi-hole:

  • Raspbian: Jessie / Stretch
  • Ubuntu: 16.04 / 16.10
  • Fedora: 28 / 29
  • Debian: 8 / 9
  • CentOS: 7 (not ARM)

You are not limited to run pi-hole only on Raspberry Pi but also any linux machine which has installed above OS.

Ok, now you have an OS installed on your Raspberry Pi. Run the following command:
curl -sSL https://install.pi-hole.net | bash
Follow the screen steps & complete the installation. After completing the install, you have to provide some blocklist. You can use my pihole-blocklist which is a collection of a bunch of popular blocklists.

To use any block list login to your pi-hole web interface usually serverIPorHost/admin/, go to settings, click on blocklists tab & set the block list links there. A screenshot of my blocklist page attached below.

Pi-hole block list setting

Your DNS server is ready now. It’s time to point your router or device to the DNS server. The DNS server is usually your public ipv4 of your raspberry pi. Search on Google to find how to setup custom DNS.

If you have any problem on installing pi-hole, please visit pi-hole’s website or github for solution or detailed instructions.

Leave a Reply