Tuesday, January 1, 2019

Turn Raspberry Pi Into Network Wide DNS Server

Turn your Raspberry Pi into a network wide DNS server for security, privacy and blocking Internet Ads on your private network!

Raspberry Pi 3 Model B+

With Technitium DNS Server version 2.2 release, it is now possible to run it on Raspberry Pi (Raspbian Stretch) using .NET Core and we have a single line automatic installer ready to make it easy to get it running.

Install DNS Server

Just connect to your Raspberry Pi using SSH and run the command below to install the DNS server:

curl -sSL https://download.technitium.com/dns/install-raspi.sh | sudo bash

You can install the software manually too if you do not wish to directly run the install script. You will need to first manually install .NET Core on your Raspberry Pi and then use these steps to install the DNS Server.

Once the installation is complete, open the DNS Server web console to view the dashboard and customize the settings.

Technitium DNS Server web console on Raspberry Pi 3 Model B+

Configure Your Router

To use it as a network wide DNS server, you need to configure your network router's DHCP settings and add your Raspberry Pi's IP address as a custom DNS server. You may also need to configure the WAN settings to override the default ISP provided DNS servers with your Raspberry Pi one. Check your router's manual for the configuration details.

Do make sure that your Raspberry Pi has a static IP address so that it does not change later causing issues with failed domain resolutions on the entire network. Also make sure to install heat sinks for your Raspberry Pi to prevent overheating issues since you will be running it round the clock.

If you have any queries or feedback, do comment below to let me know. You can also email your queries to support@technitium.com.

7 comments:

  1. Pihole does this and blocks ads network wide.

    ReplyDelete
    Replies
    1. Well, this is pi-hole's competitor that you should give a try!

      Delete
  2. Thanks a lot...

    ReplyDelete
  3. dotnet core is brilliant for this.

    ReplyDelete
  4. Got everything running fine now and prefer it way over Pi-Hole so far. Would it be possible to create an option that would automatically add a reverse dns record (if the reverse zone exists)?

    ReplyDelete
    Replies
    1. Automatic reverse zone option is only possible if there is DHCP server included, which is a planned feature that would get added in coming months. Right now, you can add a reverse zone manually. You can find a default reverse zone already there '1.0.0.127.in-addr.arpa' and try to create a zone for your local network manually. If you enter an IP address and try to add zone then the server automatically created a reverse zone for that particular IP address.

      Delete
  5. Thank you for this... I've just found you so I look forward to trying this out.

    ReplyDelete