View Full Version : DNS Request...
jlasman
06-25-2003, 07:22 AM
Would you consider switching from multi line zone file references in /etc/named.conf to single-line references?
It would make automatic scripting of slave DNS quite a bit easier; with single-line references we can use a simple one-liner to create a slave reference from a master reference.
Thanks.
Jeff
DirectAdmin Support
06-25-2003, 10:21 AM
So you want:
zone "test.com" {
type master;
file "/var/named/test.com.db";
};
to become:
zone "test.com" { type master; file "/var/named/test.com.db"; };
?
John
jlasman
06-25-2003, 10:36 AM
Absolutely :) .
I was discussing this issue a few days ago on either the isp-dns list or the bind list run by the authors of bind (and on which Cricket Liu, co-author of the O'Reilly "DNS and Bind" book is a frequent contributor).
We've all agreed that whereas multi-line zone references are easier for humans to read, most of us would rather have a line that we can parse electronically :) .
Actually I'd also like an option to add allow transfer (below should appear on one line but may not depending on your browser width):
zone "test.com" { type master; file "/var/named/test.com.db"; allow-transfer { 12.34.56.78 ; }; };
as an option; some of us would like to be able to do that so we can use vanity nameservers at different IP#s.
Jeff
DirectAdmin Support
06-25-2003, 10:54 AM
Hello,
I'll look into changing it to single line. :)
I'll see about the allow-transfer feature... would a template file be ok where you just set it once, and all new accounts have the same allow-transfer ip? This way you can set the default to whatever you wish.
John
jlasman
06-25-2003, 11:05 AM
The templated method of setting up a master allowed transfer for all domains would be great for us, and probably for just about everyone... although there's a reason why it's available on a domain-by-domain basis, I'm sure :) .
but there should also be the ability to not have it at all; many people will never need it (because they run master and slave on the same server) and having it in there without a valid IP might cause a problem. Perhaps using 127.0.0.1 as the default IP# in the template would work; I'll be happy to test it for you if you're going to do it.
Some of us would probably like to be able to put in more than one IP# (because we use more than one slave server); hopefully we'll be able to change the template to put in as many as we want.
Jeff
DirectAdmin Support
06-25-2003, 11:13 AM
What I'm think at the momment, is to just add a template with:
zone "test.com" { type master; file "/var/named/test.com.db"; };
Then you can copy it to your custom templates directory and change it however you wish.
John
jlasman
06-25-2003, 11:37 AM
Looks perfect, John.
Jeff
DigitalIsles
08-03-2003, 11:15 AM
Guys,
Has this been done yet? I looked in the "templates" directory and I see a named.db, but nothing for the named.conf file....
-Robert
DirectAdmin Support
08-03-2003, 12:23 PM
Not quite. The privious parser was very lazy to only read our format, so it has to be re-written before it can handle "any" format of zone. I'll have another look at it now.
John
DigitalIsles
08-03-2003, 12:57 PM
Thanks John, we appreciate your help!
-Robert
DirectAdmin Support
08-03-2003, 05:51 PM
All done :)
Should be included with the next release. The template file is called "zone.conf", and it's contents will look like:zone "|DOMAIN|" { type master; file "|PATH|/|DOMAIN|.db"; };Where DOMAIN and PATH are tokens that will be filled in automatically. The parser should also be able to handle embedded brackets, example: for slave zones that might have "masters { 1.2.4.5; }; in them. If you have very fancy zone settings, check your directadmin error logs, and maybe send your config's so I can make it handle them, if the parser is unable to figure them out.
John
DigitalIsles
08-04-2003, 09:43 AM
You are the man!
-Robert
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.