619-688-1784

How to set up your domain with Synology DNS Server

SOURCE

Overview

With Synology’s DNS Server package, you can turn your Synology DiskStation into a private domain name server, allowing you to provide domain name resolution services and maintain complete control of your domain’s DNS records. DNS Server is a useful tool for organizations hosting their own websites or for individuals interested in learning more about DNS. Whether for professional, educational, or recreational purposes, Synology’s DNS Server makes setting up a private domain name server quick and convenient.

In this article, we’ll look at the basics of Synology’s DNS Server and walk through the steps of creating a zone and resource records for an example domain name.

Contents

  1. What is DNS Server?
  2. Before you start
  3. Creating a master zone
  4. Resource records

1. What is DNS Server?

The Domain Name System (DNS) is like a phone book that helps computers navigate the Internet and other networks. If you’ve used the Internet, then you’ve definitely used the Domain Name System. Whenever you visit a website by entering its domain name into a web browser (e.g., www.synology.com), your web browser queries one or more DNS servers in order to find the corresponding IP address of the website you wish to visit (e.g. 120.89.71.100). This process is called domain name resolution.

If you have a registered domain name and host servers for web, FTP, or mail services, then you’ll probably want guests to be able to access your services using your domain name, instead of going through the hassle of remembering a bunch of long IP addresses. In this case, you’ll need DNS service to help guest devices translate your domain name into the corresponding IP address of your servers. One solution is to establish your own domain name server.

This is where Synology’s DNS Server package comes in handy. With DNS Server, your DiskStation can serve as a private domain name server. It provides easy-to-use options to create multiple zones, manage resource records, provide domain name resolution, and do much more. DNS Server lets you build a fast and independent DNS server solution, maintain your DNS records, and ensure your network infrastructure remains under your control.

2. Before you start

Before setting up DNS Server, please see the following requirements:

  • Install DNS Server: To install and run Synology’s DNS Server package, simply log into DSM and visit Package Center.
  • Obtain a fixed, public IP address: To set up public DNS service, you need to acquire a fixed IP address for your DiskStation. For more information, please contact your Internet service provider.
  • Register a domain name: Setting up authoritative DNS service requires registering a domain name with a domain name provider. For example, if you want to use a domain called “example.com,” you need to register the domain example with the domain provider of .com domain names. For a list of registrar web sites you can use to register your domain name, go to ICANN.org. After your registrar notifies you that your domain name is successfully registered, you can create a master zone for the domain on Synology DNS Server.
  • Check firewall or port forwarding settings: DNS services require the use of TCP and UDP port 53. If your DiskStation uses a firewall, this port must be opened. If the DiskStation connects to the Internet through a router, set up port forwarding rules and open TCP and UDP port 53.
  • Register your device: Remember to register the IP address and other required information of your DiskStation with the provider of your domain name. Otherwise, clients will be unable to query your DiskStation over the Internet. Consult your domain name provider for more information. Depending on the settings for the name servers for the provider, your changes to DNS resolvers can take effect about after 48 hours or more.
  • Change router settings: If you are going to set up your DNS server for your local network, you have to change the DNS server settings on your router or your client device so that your DNS server can be queried. For more information, please consult the manual of your router or client device.

3. Creating a master zone

Once you’ve installed DNS Server and your environment meets the requirements above, you’ll need to configure some settings before providing DNS service for your domain. First, we’ll start by creating a master zone.

A master zone stores name information regarding one or more DNS domains. The master zone serves as the authoritative source for information regarding each DNS domain name included in the zone. In the sections below, we’ll take a look at creating a master zone for our domain name “synoproduct.com.”

    1. Open DNS Server and go to the Zones tab.
    2. Click the Create button and select Master zone.
    3. Edit the following settings:
      • Domain type: Select Forward Zone, to perform resolution services from domain name to IP address.
      • Domain name: Enter your registered domain name. In this example, we’ll use a domain name “synoproduct.com.”
      • Master DNS server: Enter the public, fixed IP address that your ISP assigned to you. Guests will be directed to this IP address when querying your DNS Server for the domain name entered above. In this example, we’ll enter the IP address 59.124.41.242.

  1. Click OK to save settings. The new master zone will appear on the Zones tab.

4. Resource records

When you create a master zone, DNS Server will automatically create three resource records: a Name Server (NS) record; a Host (A) resource record; and a Start of Authority (SOA) record. The NS and A resource records can be viewed on the Edit Resource Recordscreen, as in the example below.

In this example, the NS resource record identifies the domain name server that you give to your registrar or your DNS service so that queries can be routed to your Synology NAS. The A resource record maps a domain name to an IP address. In the example above, DNS Server will resolve queries for “ns.synoproduct.com” to “59.124.41.242.”

4.1 Creating resource records

Depending on your needs, you might want to add more resource records to the master zone. In this example, we’ll create a CNAME resource record so guests will be redirected to “www.synoproduct.com” when querying “ns.synoproduct.com.”

    1. Select your zone, click Edit, and select Resource Record.
    2. On the Edit Resource Records window, click Create to add a new resource record.
    3. In this example, we’ll create a CNAME resource record.
    4. Enter the following details:
      • Name: Enter a name for the resource record.
      • TTL: Choose how long the resource record remains in the cache of other domain name servers.
      • Canonical name: Enter the host into which the name entered above should translate. In the example below, we want visitors to be redirected to “ns.synoproduct.com” when they query “www.synoproduct.com,” so we’ll enter “ns.synoproduct.com” in this field.

  1. Click OK to save settings. The new resource record appears on the Edit Resource Record window.
  2. After the settings above have been completed, browsers will be redirected to the website you specified when querying your DNS Server.

   


 

Use your Synology as a local DNS cache

SOURCE

It is totally unnecessary to have all your computers, iPad’s and iPhone’s ask your router to resolve domain names to an external DNS server whenever you click a link or enter a domain name. Why not have something that sits on your local network and forwards unknown DNS requests and then saves the cache so the next time that request would take ˜ 1 ms instead of ˜ 50 ms (or ever more if you use your ISP’s DNS service)? You can use a Raspberry Pi to do this as well (let me know if you want a post on how to do that) but since I have a Synology RackStation at home, I’ll use that instead. First of all, I click to en Synology Package Center and installed a package call ‘DNS server’. dnsdns After that I entered the settings page for the DNS server and activated it as well as activated forwarding to Googles DNS servers. Here you can enter anyones you want. I find Google’s fast and reliable. settingssettings And then I adjusted some of the size settings. sizesize Just to try it out I did a series of 30 parallell queries on a domain on my computer.   And then I ran the test again, this time getting Average query = 23,3 ms. Cut by half, but remember, the first query is not cached so that probably took at least 50 ms!. Running the query once more should return just cached responses. Average query = 1,1 ms Indeed, this is fast! Anyway, if I just leave it with this and take my computer outside my home network, I’m not going to be able to resolve any domains since my computer won’t be able to find my local DNS server. So, remove the ip to the Synology in the network settings no the mac (leave it empty, defaulting to the current router/gateway). I want to efter this in my routers settings so everyone on my home network gets tt benefit from this. I have an Apple Airport Extreme (which actually has a DNS cache itself so this will not have any impact) so I start the app Airport Utility and enter the local ip to my Synology in BOTH DNS server IP fields. Refer to your router’s manual on how to change DNS server settings. All done.  
HTML Snippets Powered By : XYZScripts.com