DNS Name Server for Thecus NAS
Installation
The Berkeley Internet Name Domain (BIND)
from the Internet Systems Consortium is the most widely used
domain name server software on the Internet. You can use it to provide name services to your
local network, by installing it on your Thecus NAS:
Directly after installing, the DNS server needs to be activated (enabled in the NAS
administration web page). You can test the server by querying an example entry in the sample zone
files that get installed along with the server. Issue the command (with your NAS' IP address, of
course)
- nslookup nenya.rings.org [NAS_IP_address]
either from your Unix command line, or from the Windows command shell (click "Start" and
select "Run...", then enter "cmd" to start the shell). The output should
look like these lines:
user$ nslookup nenya.rings.org 192.168.222.12
Server: 192.168.222.12
Address: 192.168.222.12#53
Name: nenya.rings.org
Address: 192.168.1.2
The sample zone files describe a (fictional) network with the domain name rings.org.,
comprising the hosts nenya.rings.org, vilya.rings.org, narya.rings.org, and
nas.rings.org, with the IP addresses 192.168.1.2, 192.168.1.3, 192.168.1.4, and 192.168.1.1,
respectively. Please choose a different (preferably your own) domain for your purpose, as this
domain may get registered by somebody in the future.
Configuration
Apart from writing up the zone files, hardly any configuration is necessary to provide name services
for a small network. Use the module's configuration page in the NAS administration interface to
download the installed server configuration. The file is a gzipped tar archive which can be unpacked
under both Unix (using tar) and Windows (for instance using WinZIP). The files use
the Unix convention of terminating lines with a single line feed character, under Windows use the
WordPad program to display them properly.
The tar archive contains the following files:
- named.local
-
This file includes the zone files proper. It must contain two entries for every domain the name
server is to be authoritative for: One entry points to the file containing the forward name
resolution data for the domain (i.e. the mapping of DNS names to IP addresses), the other one
the reverse mapping. Remember how reverse lookups are organised: A dotted quad IP address is
written up reversed and padded with .in-addr.arpa to formally become a domain name with
an entry in it's own zone file.
This file must always be present if a modified file is uploaded as a new configuration.
- db.rings
-
Here the zone information for the domain rings.org. is stored. Apart from a header it
contains mappings of domain names to IP addresses. Wikipedia has a good description of the
zone file format.
- db.rev-rings
-
The reverse mappings. The network corresponding to the domain rings.org. is 192.168.1.0/24.
The domain for the reverse lookup therefore is 1.168.192.in-addr.arpa. To complete the
IP address, in this pseudo domain only the last part of the IP address is missing, therefore the
file contains a mapping of this last number of the IP address to the domain name.
- named.options
-
This file contains options for the DNS server. The directory option must not be changed
for the server to function properly. Feel free to add options.
This file must always be present if a modified file is uploaded as a new configuration.
- MAGIC
-
This file tells the module configuration page that this is a zone file archive. Do not modify this
file, and make sure to include it when you build a new configuration file.
This file therefore must always be present if a modified file is uploaded as a new configuration.
To modify the configuration, modify the files and construct a new archive, which you can upload using
the module's configuration page. Under Unix, you'd choose the .tar.gz format, while under
Windows the .zip format is more convenient. The module configuration page digests both formats.
Of course you're free to choose different file names for the zone files (i.e. the db.* files
in the sample data), but make sure the file names are entered into the named.local file so
that the server can access them.
Particularly the named.options file can be used to add further server configuration options.
Unfortunately, the documentation of the server configuration that
comes with the BIND release 9.3.1 is not too useful, as it merely lists all the available
options, without explaining them. The BIND release 8 ist much more helpful in this respect;
as the configuration formats are largely compatible, it's documentation
can be used to understand most of the available options.
A small section of the configuration is not accessible; it should not be changed normally. It primes
the server with knowledge about the DNS root servers (as at 19th of February 2011), and sets up the
loopback and broadcast zones.
License
BIND is open source software under the GPL (Wikipedia:
GNU General Public License). I packaged the
BIND binary from Slackware version 10.2 (the
Thecus NAS firmware is based on this Linux distribution) utilising some scripts that Andreas Vogel
wrote to package his SSHD NAS module. As all the components are under the GPL, so is the
whole module package from this web page.
The GPL requires the source code to be available. The module file is a simple .tar.gz
file that can be unpacked using the Unix tar tool. The scripts are their own source code.
The BIND binary is straight from the Slackware install CD, so
here is the source code from the Slackware source code CD.
Modified 2011-03-09 by Peter Rottengatter
Impressum