Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 09-19-2013, 09:27 AM   #1
Registered: Oct 2012
Posts: 47

Rep: Reputation: Disabled
BIND 9.9 DLZ with MySQL backend reverse lookup issue.

I'm trying to setup a BIND dns server with mysql backend database. I have compiled bind with mysql support and have installed a schema in the mysql database. Now I am able to do forward lookups of A records but I can't do a reverse lookup. I understand I have to write a new query for that, but i don't know which token to replace '$record$' with. Here is my dlz configuration

dlz "Mysql zone" {
   database "mysql
   {host=localhost  port=3306 dbname=BindDB user=Bind_User pass=Bind_User ssl=tRue}
   {SELECT zone FROM dns_records WHERE zone = '$zone$'}
   {SELECT ttl, type, mx_priority, IF(type = 'TXT', CONCAT('\"',data,'\"'), data) AS data
    FROM dns_records
    WHERE zone = '$zone$' AND host = '$record$' AND type <> 'SOA' AND type <> 'NS'}
   {SELECT ttl, type, data, primary_ns, resp_person, serial, refresh, retry, expire, minimum
    FROM dns_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_person, serial, refresh, retry, expire, minimum
    FROM dns_records
    WHERE zone = '$zone$' AND type <> 'SOA' AND type <> 'NS'}
   {SELECT zone FROM xfr_table where zone='$zone$' AND client = '$client$'}";

Also in the reply at the client side, the authority section is returning the IP address prefixed with the hostname. What might be the problem here ??

    <Hostname> 180     IN      A      <IP>
    <NS Hostname>.      180     IN      NS      <NS IP>.<NS Hostname>.
Old 09-20-2013, 02:21 AM   #2
Registered: Oct 2012
Posts: 47

Original Poster
Rep: Reputation: Disabled
Okay I have fixed the authority section after correctly formatting the NS record in the database. But still no clue on how to do a reverse lookup.
Old 09-17-2015, 07:56 PM   #3
LQ Newbie
Registered: Sep 2015
Posts: 1

Rep: Reputation: 0
Hi, i recently installed BIND with MySQL support, and I have the same problem you reported, that bind can't do the reverse lookup. Did you found a way to do it?

I've already posted in the DLZ mailing list, but there was no answer.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Issue with Reverse Lookup on RHEL 5 when using BIND anandr4u Linux - Server 8 07-22-2013 08:15 PM
Bind reverse lookup mattyg007 Linux - Networking 1 12-08-2011 12:11 PM
Can bind dlz work with the mysql stored procedure? oranix Linux - Server 1 01-22-2011 06:58 AM
[SOLVED] bind reverse zone; no name with reverse lookup deadeyes Linux - Server 3 10-12-2009 09:54 AM
Bind reverse lookup Kostko Linux - Networking 2 12-07-2002 09:06 AM

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration