Re: Red Hat Enterprise Linux Server release 5.3
Bradley Giesbrecht <[email protected]> Fri, 6 Mar 2009 09:13:35 -0800
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Message-ID | <[email protected]> |
On Mar 5, 2009, at 8:13 PM, Todd Lyons wrote:
> On your mysql server, add this to the /etc/my.cnf:
>
> log=/var/lib/mysql/query.log
Nothing but mysql client queries are logging.
> Then restart mysql. Then do a few queries. If you don't see any
> queries getting put into the (plain text file) query.log, then your
> bind is not asking mysql anything. A double check is to run on the
> dns server:
>
> tcpdump -n -p -s 1500 -X port 3306
Nothing.
Can I do this from the same machine
> If you don't see any output, then you've verified that your bind is
> not asking the mysql server any information.
>
> Put your named.conf (and any files it includes, obfuscating passwords)
> in your next email. There might be something really obvious wrong
> with it. Also, most bind configurations are configured to use
> changeroot by default, which means you should probably be looking at
> /var/named/chroot/etc/named.conf (may vary in your configuration)
> instead of /etc/named.conf.
Thanks Tood.
I did not install the bind-chroot rpm. If I should I will.
I am seeing this in /var/log/messages when I do queries that should
return results from dlz:
Mar 6 08:39:41 octane named[11840]: client 127.0.0.1#32784: query:
newgeo.com IN A +
Mar 6 08:39:41 octane named[11840]: network unreachable resolving './
NS/IN': 2001:7fd::1#53
Mar 6 08:39:41 octane named[11840]: network unreachable resolving './
NS/IN': 2001:503:ba3e::2:30#53
Mar 6 08:39:41 octane named[11840]: network unreachable resolving
'newgeo.com/A/IN': 2001:503:a83e::2:30#53
Below is my named.conf. There is a file based zone "test.com" which
does return a result.
--
Brad
[root ~]# cat /etc/named.conf
options {
directory "/var/named";
querylog yes;
};
zone "." IN {
type hint;
file "named.ca";
};
key "rndckey" {
algorithm hmac-md5;
secret "yFvldkQTu8uPFLP0r4vxnw==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndckey"; };
};
zone "test.com." IN {
type master;
file "test.com.db";
allow-query { any; };
};
dlz "Mysql zone" {
database "mysql
{host=127.0.0.1 dbname=dns user=dns pass=dns ssl=false port=3306
socket=/var/lib/mysql/mysql.sock}
{SELECT zone FROM resource_records WHERE zone = '%zone%'}
{SELECT ttl, type, mx_priority, IF(type = 'TXT',
CONCAT('\"',data,'\"'), data) AS data
FROM resource_records
WHERE zone = '%zone%' AND host = '%record%' AND type <> 'SOA' AND
type <> 'NS'}
{SELECT ttl, type, data, primary_ns, resp_contact, serial,
refresh, retry, expire, minimum
FROM resource_records
WHERE zone = '%zone%' AND (type = 'SOA' OR type='NS')}
{SELECT ttl, type, host, mx_priority, IF(type = 'TXT',
CONCAT('\"',data,'\"'), data) AS data, resp_contact, serial, refresh,
retry, expire, minimum
FROM resource_records
WHERE zone = '%zone%' AND type <> 'SOA' AND type <> 'NS'}";
};
[root ~]#
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H