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.
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.
Once it's installed, make sure it's up and running.
The configuration has two sides:
- the DNS server
- your computer(s)
Sections below illustrate them.
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:
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:
All you need to do is enable the resolution services and fill up the fallback DNS servers.
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.
You could add things like reverse zones, static names for local machines... However, all this falls out of the scope of this post.