How does DNS management work in HSPcomplete?

Article ID: 653 
Last Review: Oct,6 2008
Author:
Last updated by: system APPLIES TO:
  • Parallels Business Automation - Standard

Resolution

Generally HSPcomplete supports only linux-based nameservers. It is possible to 'emulate' linux and register a nameserver based on another OS, however it cannot be guaranteed that it will work without problems.
Slaves on different OSes are not tested and it is quite possible that after some HSPcomplete update DNS syncronization will stop working as well as after software update on nameserver itself.

There are 2 related but different tasks- registration of a new nameserver and synchronization. Registration does the following:

1) a dedicated user is created, username and groupname is hardcoded as well as tools for creating user,
2) bind configuration is changed.

Below are just suggested steps. You don't need to follow them (for example you can change name for FreeBSD's user/group 'bind' and use it. You don't have to define UID/GID etc.)


Creating user named:

-su-2.05b# pw useradd -n named -u 525 -d /var/named -s /sbin/nologin
-su-2.05b# chown named:named /var/named


Populating /var/named directory:

-su-2.05b# cd /etc/namedb
-su-2.05b# sh make-localhost
-su-2.05b# cp localhost.rev named.root /var/named/.


Creating named.conf file:

-bash-2.05b# cat /etc/named.conf
options {
    directory "/var/named";
    pid-file "/var/run/named/named.pid"; };

controls {
    unix "/var/run/ndc"
    perm 0660
    owner 525
    group 525;
};

zone "." {
    type hint;
    file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
};


Configuring named to start automatically at boot time:

-su-2.05b# echo 'named_enable="YES"' >> /etc/rc.conf
-su-2.05b# echo 'named_flags="-u named -g named /etc/named.conf"' >> /etc/rc.conf


Start named:

-su-2.05b# /usr/sbin/named -u named -g named /etc/named.conf


Creating linux-specific files/dirs for registration to succeed:

-su-2.05b# cd /usr/sbin; ln -s /usr/bin/true chkconfig
-su-2.05b# ln -s ndc rndc
-su-2.05b# mkdir /etc/sysconfig
-su-2.05b# touch /etc/sysconfig/named
-su-2.05b# mkdir /etc/init.d
-su-2.05b# cd /etc/init.d/
-su-2.05b# ln -s /usr/bin/true named

Nameserver registration should succeed after these steps. Note: if you try to reconfigure already existing nameservers with status 'error', use 'Edit' button instead of 'Recreate' and specify root password for your nameserver. Otherwise registration can fail (root password is removed from the database after successful
registration and, if it is not there, - HSPcomplete will try to connect to a nameserver as user 'namedsync' but not as root - in this case registration process will fail).


Syncronization:
When a domain is added or removed through the interface, hspcomplete uploads updated named.zones file to the slaves and reloads named there. Which means that if a zone has any errors and bind on master refused to load it - zone content will never be on slaves (attempt to fetch zone content from master will fail because the zone is not loaded on master). The problem can happens with wrong DNS template. For example, if it create a zone with both A and CNAME records for www hostname; bind 9 refuses to load such zone.

[root@SlaveNS]# dig @localhost domain.com soa

; <<>> DiG 9.2.2-P3 <<>> @localhost domain.com soa
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 27431
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;domain.com. IN SOA

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Tue Dec 7 21:51:40 2004
;; MSG SIZE rcvd: 30


and slave refuses to get content from the master:

Dec 7 20:00:44 max named-xfer[75957]: [217.114.127.100] not
authoritative for domain.com, SOA query got rcode 2, aa 0, ancount 0,
aucount 0


Subscription for this article changesSubscription for this article changes

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields