Set Up a Local DNS with Synology DiskStation

The last days I tried to set up a local DNS cache thing on my Synology, just to use up the CPU a bit more. Why? Because once the request is in the cache, it’s much faster :)

So, here is a simple tutorial to set up the DNS on your Synology box.

Prerequisites

There are, of course some prerequisites to all this:

  • A Synology box. I have a DS1515+, but AFAIK any will work
  • Your DNS addresses. All ISPs have their own, but you can get Google’s too
  • An internet connection (no proxy preferably)
  • Remember your DiskStation’s IP address
  • Optional but recommended: make your DiskSTation’s IP address a static one. Your router should be able to do that.

Once you have that, you can log in on the DiskStation console and install the DNS server package.

Synology DNS package

Once it’s installed, make sure it’s up and running.

Configuration

The configuration has two sides:

  1. the DNS server
  2. your computer(s)

Sections below illustrate them.

DNS Server

The simplest configuration has only a few steps.

First, create a master zone:

  • Domain type: “Forward Zone”
  • Domain name: a made up domain name. I picked up “home.local” in case I’ll add other machines by name (e.g. server.home.local, diskstation.home.local)
  • Master DNS Server: your DiskStation’s IP address (192.168.0.110 in my case)

Image below illustrates these settings:

Synology - DNS settings

Now you have a basic DNS server. However, if you set up your local machine to point to it and try to find an external site, it’ll fail. Hence…

Second, you need to configure a fallback DNS for looking up unknown names. The resolution tab in the DNS Server configuration has everything:

Synology DNS Setup

All you need to do is enable the resolution services and fill up the fallback DNS servers.

Your Computer

The idea is to point your machine to the IP address of the DiskStation (to use your freshly configured DNS service) — hence the advice above the IP address should be fixed. Since most if not all OS-es allow multiple DNS servers, you gain the most by having your DiskStation as the first entry.

Actual setting up your computer depends on your OS. Google has a nice description for all major OS-es, which you can adapt to use your own (ISP’s) servers.

More options

You could add things like reverse zones, static names for local machines… However, all this falls out of the scope of this post.

HTH,


A little experiment: If you find this post and ad below useful, please check the ad out :-)




7 thoughts on “Set Up a Local DNS with Synology DiskStation

  1. I’ve followed this guide and others that are similar. While it seems that this works, I’ve found that my clients always fail over to the secondary DNS (I have a DHCP server handing out both the local DNS as primary and remote DNS as secondary). So, one way to verify that the local DNS service isn’t doing its job is to configure your DHCP server to only hand out only the local DNS. When configured with just a local DNS clients can’t find domains at all.

    1. It doesn’t, it always uses the secondary DNS on your OS. Per the DNS app, it already has a fallback DNS so you shouldn’t need to enter anything in your OS but the DS ip.
      There’s plenty of documentation on the forums the app doesn’t work (the instructions listed here are correct it seems).

  2. Thanks for the tutorial! Question: how do we specify computers in the network? macbook.home.local, server.home.local, etc.?

    1. This is done via multicast DNS (mDNS) ir a local DNS server (as noted here).

      If you have mDNS, then they’re discovered automatically, without other intervention.

      The alternative is more convoluted. In the past, I ended up specifying IP addresset at some point in the router (instead of dynamic addresses) and hard-coded the mapping to the DNS server.

    1. IMHO caching and faster lookup. If you replace the default service with something like PiHole (in Docker), you get filtering too, but YMMV.

  3. Thank you, I was able to use some of the information contained here to access my Sonology box with a domain name I just registered. Will have to tackle SSL certificate next.

    Regardless, I appreciate the time and effort you took to create this information.

Leave a Reply to marks socks Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top