PDA

View Full Version : DNS hosting as a hosting package feature



Webcart
07-09-2007, 02:01 PM
Hello,

this request is refinement of the following threads:
More flexible DNS control (http://www.directadmin.com/forum/showthread.php?t=16598)
More Control Over Services (http://www.directadmin.com/forum/showthread.php?t=18290)

Currently, each domain on the DirectAdmin server can use that server for DNS hosting, that is, it's not possible to offer DNS hosting as a value-added service which could be enabled for qualified accounts only.

We've been experimenting with creating "DNS hosting" custom package item (http://www.directadmin.com/features.php?id=479) and using its value to automatically delete DNS zones where necessary. We've also created domain_create_post.sh, domain_destroy_post.sh (http://www.directadmin.com/features.php?id=183) and domain_change_post.sh (http://www.directadmin.com/features.php?id=448) scripts to maintain an accurate list of existing domains (DA currently uses named.conf file as the index to determine if a domain exists on the server or not).

Unfortunately, this didnt work quite well, since DA apparently checks DNS zone entries for number of tasks. For example, an attempt to add/delete a subdomain failed when there was no DNS zone. Also, it wasn't possible to tell DA to use external mailserver for such domain.

Thank you.

nobaloney
07-12-2007, 11:10 PM
Gee, I always thought DA was for webhosting ;) .

We've been hosting DNS for thousands of domains, for years. We've never done it with DirectAdmin :) .

Jeff

demz
07-13-2007, 07:28 AM
We just add an user, put domains on unlimited and the rest nothing in the package..

Then he's an DNS only Customer...

Webcart
07-13-2007, 11:34 PM
We just add an user, put domains on unlimited and the rest nothing in the package..

Then he's an DNS only Customer...

This request was actually about disabling DNS hosting for webhosting packages by default and enabling it only where necessary.

Thanks for reminding me how confusing my posts can be sometime :)

Have a great weekend everyone!

Webcart
07-13-2007, 11:47 PM
We've been hosting DNS for thousands of domains, for years. We've never done it with DirectAdmin :) .
Actually, even if you run dedicated DNS servers, it still makes sense to use DA: it will simplify maintenance... unless you dont have that many boxes to manage or/and you manage them all personally.

nobaloney
07-16-2007, 08:16 PM
This request was actually about disabling DNS hosting for webhosting packages by default and enabling it only where necessary.
You can't run webhosting without DNS because DA uses the existence of the DNS file as a determination that the domain exists.

Maybe it shouldn't, but it does.

Jeff

nobaloney
07-16-2007, 08:17 PM
Actually, even if you run dedicated DNS servers, it still makes sense to use DA: it will simplify maintenance... unless you dont have that many boxes to manage or/and you manage them all personally.
And my posts can be misleading as well. I didn't mean we don't use DirectAdmin DNS; we do for our webhosting. It's for those thousands of domains for which we run DNS without DA-based webhosting, that we don't use DA's DNS.

Sorry about the confusion.

Jeff

Webcart
07-16-2007, 08:35 PM
You can't run webhosting without DNS because DA uses the existence of the DNS file as a determination that the domain exists.

Maybe it shouldn't, but it does.

That's one of the things this request is about :)
If DA stops relying on DNS file, it will be fairly easy to make other changes descibed above as well so that DNS hosting isn't automatically provided for all accounts.

Almost all our hosting clients prefer to keep DNS hosting with their domain registrars nowadays and we would like to keep DNS info in sync at all times.

Webcart
07-16-2007, 08:54 PM
BTW, a fairly easy way to check existence of domains without relying on DNS file is maintaining a file or symbolic link for each created domain name.
For example, here is domain_create_post.sh file:


#!/bin/sh

DIRNAME=/usr/local/directadmin/data/domains

mkdir ${DIRNAME}
cd ${DIRNAME}
ln -s /home/${username}/domains/${domain}/public_html ${domain}

Marshall
07-17-2007, 12:04 PM
Another way to keep track would be


#!/bin/sh
echo ${DOMAIN} >> /usr/local/directadmin/data/admin/domains.list;
exit 0;
and run a grep on it like

grep ^${DOMAIN}$ /usr/local/directadmin/data/admin/domains.list to see if it exists in the file. Can use sed to delete the line from the file if the domain is deleted.

Of course the programming itself is all different if added to DA as it will probably be added in as C instead of using shell scripting since C would process it all much faster.

nobaloney
07-18-2007, 05:53 PM
does the domains.list include all aliases and redirects? Those need to be checked against too; you can't set up a domain if there's already an alias or a redirect.

Jeff