Re: Delegate NS for subdomain
Николай <[email protected]> Wed, 28 Jan 2009 23:36:56 +0300
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Organization | RCfXI |
| Message-ID | <[email protected]> |
Hello.
Thanks all.
I find a good solution. I make like Todd, and rewrite SQL queries.
In my solution it isn`t create additional zone, as against of Todd.
But you can create index in your databese, if you have the highload
system (CREATE INDEX host_zone ON rec (`host`,`zone`)).
{SELECT rec.zone FROM rec
WHERE ((rec.host = '@' AND rec.zone = '%zone%')
OR (rec.host != '@' AND concat(rec.host,'.',rec.zone) = '%zone%'))
LIMIT 1}
{SELECT ttl, type, priority, IF(type = 'TXT', CONCAT('\"',data,'\"'), data) AS data FROM rec
WHERE rec.zone = '%zone%' AND rec.host = '%record%' AND type <> 'NS' AND type <> 'SOA'}
{SELECT ttl, type, data, ns, contact, serial, refresh, retry, expire, minimum FROM rec
WHERE ((rec.host = '@' AND rec.zone = '%zone%') OR
(rec.host != '@' AND concat(rec.host,'.',rec.zone) = '%zone%'))
AND (type = 'SOA' OR type='NS')
ORDER BY type='SOA' desc}
{SELECT ttl, type, host, priority, IF(type = 'TXT', CONCAT('\"',data,'\"'), data) AS data, ns, contact, serial,
refresh, retry, expire, minimum FROM rec
WHERE rec.zone = '%zone%'}
{SELECT xfr.zone from xfr
WHERE xfr.client = '%client%' AND '%zone%' like xfr.zone
ORDER BY zone = xfr.zone DESC LIMIT 1}
{INSERT INTO counting SET count=1,zone='%zone%' ON DUBLICATE KEY UPDATE count=count+1}
P.S. IMHO dlz can`t be you used in production, because answer and
authority section not correspond specification.
TL> I had composed a long email of things to try, then it suddenly became
TL> obvious what was wrong. However, I left the whole thought process in
TL> order to illustrate how the docs and a little thinking led me to what
TL> the problem was. The answer is at the end of the email.
TL> On Mon, Jan 26, 2009 at 2:31 PM, Николай <[email protected]> wrote:
>> Здравствуйте, Todd.
>>
>> Вы писали 26 января 2009 г., 6:09:24:
>>
>> TL> On Fri, Jan 23, 2009 at 5:34 AM, Николай Шуляковский
>> TL> <[email protected]> wrote:
>> TL> <snip>
>>>> And not correct answer from NS server:
>>>> dig NS gorodok32.ru @ns3.agava.net.ru
>>>>
>>>> ; <<>> DiG 9.4.2-P2 <<>> NS gorodok32.ru @ns3.agava.net.ru
>>>> ;; global options: printcmd
>>>> ;; Got answer:
>>>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62459
>>>> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
>>>>
>>>> ;; QUESTION SECTION:
>>>> ;gorodok32.ru. IN NS
>>>>
>>>> ;; ANSWER SECTION:
>>>> gorodok32.ru. 7200 IN NS ns2.mamba.ru.
>>>> gorodok32.ru. 7200 IN NS ns1.agava.net.ru.
>>>> gorodok32.ru. 7200 IN NS ns1.mamba.ru.
>>>> gorodok32.ru. 7200 IN NS ns2.agava.net.ru.
>>
>> TL> This tells me that there is something wrong with the query that bind
>> TL> dlz is building. Show your DLZ config.
>>
>> Where bug?
<skip>
--
Best regards,
Nikolas mailto:[email protected]
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bind-dlz-testers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers