How to configure an authorative name server [FaJoDNSServer]

This howto describes how to configure the domain name server privided with the FaJoDNSServer module. To configure the name server shell access is required (local console or remote through ssh).

The following terms/shortcuts are used within this howto:

DNSCONF - the configuration base directory:

/raid/data/module/FaJoDNSServer/system/etc/named

DNSDATA - the base directory for zone files, logs, etc.:

/raid/data/module/FaJoDNSServer/system/var/named

NASIP1 - the IP address of the first (master) NAS

we use 192.168.1.101

To tell the server daemon to reload it's configuration you can use the modules management page or issue the command:

/raid/data/module/FaJoDNSServer/system/etc/rc.d/dns-server  reload

Configuration of a master zone

A master zone holds data the domain name server is authorative for. The below example will

  • configure a zone for the domain home.local
  • configure a reverse zone for the home network 192.168.1.0/24

First the two data files holding the zone data will be created. Since we create master zones, these data file will go to DNSDATA/master

  • DNSDATA/master/db.home.local
  • DNSDATA/master/db.192.168.1

File names do not matter here but the db.xxx syntax is what I will use here. These files could even be created in a shared folder to allow them to be edited offline.

The file db.home.local should read:

$TTL 1D

@ IN SOA ns1.home.local. zonemaster.home.local. (
2012051501 ; serial
4H ; refresh
2H ; retry
1W ; expire
8H ; minimum
)

@ IN NS ns1 ; wrinting 'ns1' this is the same as
; writing 'ns1.home.local.' here

ns1 IN A 192.168.1.101

The file db.192.168.1 should read:

$TTL 1D

@ IN SOA ns1.home.local. zonemaster.home.local. (
2012051501 ; serial
4H ; refresh
2H ; retry
1W ; expire
8H ; minimum
)

@ IN NS ns1.home.local.

101 IN PTR ns1.home.local.

Now the zone data files need to be registered with the server. To do so we create the configuration file DNSCONF/named.d/home.conf that reads:

zone "home.local" {
type master;
file "master/db.home.local";
};

zone "1.168.192.in-addr.arpa" {
type master;
file "master/db.192.168.1";
};

Relative file names will get DNSDATA prepended.

Once finished tell the server to reload it's configuration. If the reload command failed you may want to test the configuration by running:

/raid/data/module/FaJoDNSServer/system/etc/rc.d/dns-server  configtest

With the new configuration active you can now query the server from a Linux/Unix host by running:

dig  @192.168.1.101   ns1.home.local

This should return someting like:

...

;; ANSWER SECTION:
ns1.home.local. 86400 IN A 192.168.1.101

...

 

.