Order of Operations issue.

"Michael J. Ayers" <[email protected]>
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
I am trying to get a DNS server here answering queries for our domain, but
it is not working in the way I was hoping.  I have set up the server to
answer for our domain as if it is the Authoritative DNS server.
 Unfortunately, it seems that whenever I do a lookup against it, the server
goes out to the root servers, finds the ACTUAL authoritative server for the
domain, then retrieves information from that server.  I want it to not do
that so that I can test that my database is working properly and that the
server is querying it.  Any ideas?  I have attached my named.conf below.  It
seems it is not even trying to query the database from what I can see in the
debug log I created.


acl "all" { 0.0.0.0/0; };
options {
       directory "/var/named";
       /* forward first; */
       /* forwarders { */
       /*      4.2.2.1; */
       /*      4.2.2.4; */
       /* }; */
       allow-query { "all"; };
};

logging {
       channel test.debug {
               file "/tmp/satest.debug.log";
               severity debug;
               print-time yes;
               print-severity yes;
               print-category yes;
       };
       category "default" { test.debug; };
       category "security" { test.debug; };
       category "config" { test.debug; };
       category "queries" { test.debug; };
       category "parser" { test.debug; };
       category "eventlib" { test.debug; };
};

view "internal" {
       match-clients { localnets; 10.0.0.0/8; };

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

       dlz "Mysql zone" {
               database "mysql
               {host=localhost dbname=dns_internal user=dns pass=password}
               {select zone from records where zone = '%zone%'}
               {select ttl, type, mx_priority, case when lower(type)='txt'
then concat('\"', data, '\"') when lower(type) = 'soa'
                 then concat_ws(' ', data, resp_person, serial, refresh,
retry, expire, minimum) else data end from records
                 where zone = '%zone%' and host = '%record%'}
               {}
               {select ttl, type, host, mx_priority, case when
lower(type)='txt' then
                 concat('\"', data, '\"') else data end, resp_person,
serial, refresh, retry, expire,
                 minimum from records where zone = '%zone%'}
               {select zone from xfr where zone = '%zone%' and client =
'%client%'}";
       };
};

view "external" {
       match-clients { any; };

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

       dlz "Mysql zone" {
               database "mysql
               {host=localhost dbname=dns_external user=dns pass=password}
               {select zone from records where zone = '%zone%'}
               {select ttl, type, mx_priority, case when lower(type)='txt'
then concat('\"', data, '\"') when lower(type) = 'soa'
                 then concat_ws(' ', data, resp_person, serial, refresh,
retry, expire, minimum) else data end from records
                 where zone = '%zone%' and host = '%record%'}
               {}
               {select ttl, type, host, mx_priority, case when
lower(type)='txt' then
                 concat('\"', data, '\"') else data end, resp_person,
serial, refresh, retry, expire,
                 minimum from records where zone = '%zone%'}
               {select zone from xfr where zone = '%zone%' and client =
'%client%'}";
       };
};

Thanks for any and all help.


-- 
Michael J. Ayers
Senior Systems Engineer

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Bind-dlz-testers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.