The DirectAdmin interface currently only allows for 2 nameservers to be entered. Â You can add a 3rd namesevrer to all old and new domains, but requires some simple file editing.
We'll assume that the 3rd nameserver is called ns3.host.com and that the user domains are calleddomain.com
1) First, setup the default ns template so that any newly created domains have the 3rd nameserver.
cd /usr/local/directadmin/data/templates/custom
cp ../dns_ns.conf .
ns3.host.com.=|DOMAIN|.
Make sure you add the periods to the end of each value, they're very important. Â This will now add a 3rd namesever for all domains created after this point.2) Next, to change the existing domains, we need to edit the named.db template temporarily. Type
cd /usr/local/directadmin/data/templates
(without the /custom). Â Edit the named.db file. Â At the very bottom of the file, add:|DOMAIN|. Â Â Â 14400 Â IN Â Â Â NS Â Â Â ns3.host.com.
Again paying special attention to the periods at the end of the values. Â Now, any rewrite done by DirectAdmin will add that line, so let's now issue a full dns rewriteecho "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d400
If you want the ns3 value to vary per Reseller, you can use if-then-else type statements in the dns_ns.conf, since all templates support scripting, eg:
|NS1|=|DOMAIN|.
|NS2|=|DOMAIN|.
|*if NS1="ns1.ofreseller1.com."|
ns3.ofreseller1.com.=|DOMAIN|.
|*else|
ns3.globalforeveryoneelse.com.=|DOMAIN|.
|*endif|