This is a simple guide on how setup a dns server on a qnap-ts-253A [firmware version 4.3.3] nas, why do that? well because significantly speed up the domain resolution and it can handle internal domains to the LAN and in the end because we can do  🙂
to achieve this we need a program that handles the dns requests, there are many programs that do this, but in this guide we use only bind. Bind is not distributed in the qnap store so we need to install another program to do this, this program is Entware-ng. I believe this guide also be used in other qnap model just get the enterware/bind version for the right platform [armv5 (x19), armv7 (x31, x41 – models x31/x31+), x86-32, x86-64)].
After this brief introduction proceed with the instructions:

  1. install the Entware-ng
    • donwload the qpkg package from here
    • install it by the web interface
  2. install bind9
    • login into the nas with ssh on admin account
    • install it, execute: opkg install bind-server
    • create a soft link to bind directory, execute: ln -s /opt/etc/bind /etc/bind
  3. setup bind9
    • edit the named.conf file, execute: vim /opt/etc/bind/named.conf
      in this file you need to remove the quotation marks into the forwarders section and add two zone for the new custom LAN domain.
      The file result should be like this:


  • in my first custom zone to specify the file that will handle the conversion machine network name to IP, this zone is named dns.lan.
    the second one to specify the file that will handle the conversion IP to machine network name, this zone is named 1.168.192.in-addr.arpa, note as the zone name is the reverse of the class C address of the network itself
  • create file db.dns, execute: cp /opt/etc/bind/db.local /opt/etc/bind/db.dns
  • edit it, execute: vim /opt/etc/bind/db.dns
    add the LAN domains in your network and take care to replace the string localhost. with the network name of your server[uname -n] and root.localhost. with the name of the account[whoami] plus the network name of your server[uname -n].
    The file result should be like this:



  • create file db.192.168.1, execute: cp /opt/etc/bind/db.local /opt/etc/bind/db.192.168.1
  • edit it, execute: vim /opt/etc/bind/db.192.168.1
    this file holds a reverse resolution, you should do the same changes as the previous one, only at the end remember to include domains for placing first last suffixes of each ip address.
    The file result should be like this:


start bind9, execute: /opt/etc/init.d/S09named restart
we can verify that everything is working by running this command:

setup LAN devices and test dns server

  • now we change the IP DNS with the QNAP IP in all devices connected to the LAN [laptop,tv,cell…]
  • test it, execute: dig https:://www.duckduckgo.com