OpenChange Samba4 Setup with Bind9 DLZ MySQL Reverse Lookup Failing

Discussion in 'Installation/Configuration' started by DantePasquale, Dec 11, 2013.

  1. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Hi All, not sure if anyone can help out here, but I'm running Ubuntu 12.04 64 and am trying to get OpenChange up and running as a proof-of-concept on a dev server. I'm using Bind9 DLZ so that I can move DNS off of the same box in the future.

    I've compiled it and set it up and it's working fine, except for reverse DNS lookups. Not sure what's needed for that, but there seems to be no data in MySQL to do reverse lookups. Anyone have any ideas?

    Code:
    nslookup openchangedev.sfpi-test.local
    Server:		192.168.4.110
    Address:	192.168.4.110#53
    
    Name:	openchangedev.sfpi-test.local
    Address: 192.168.4.110
    Code:
    nslookup 192.168.4.110
    Server:		192.168.4.110
    Address:	192.168.4.110#53
    
    ** server can't find 110.4.168.192.in-addr.arpa.: NXDOMAIN
    MySQL Data:

    Code:
    mysql> select * from bind9_dlz.dns_records order by 1;
    +----+-----------------------------+---------------+-------+---------------+------+-------------+---------+-------+--------+---------+------------+-----------------------+---------------+
    | id | zone                        | host          | type  | data          | ttl  | mx_priority | refresh | retry | expire | minimum | serial     | resp_person           | primary_ns    |
    +----+-----------------------------+---------------+-------+---------------+------+-------------+---------+-------+--------+---------+------------+-----------------------+---------------+
    |  1 | sfpi-test.local             | @             | SOA   | NULL          |  180 |        NULL |   10800 |  7200 | 604800 |   86400 | 2013121002 | [email protected] | 192.168.4.110 |
    |  2 | sfpi-test.local             | @             | NS    | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    |  3 | sfpi-test.local             | @             | A     | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    |  4 | sfpi-test.local             | www           | CNAME | @             | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    |  5 | sfpi-test.local             | openchangedev | A     | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    |  6 | xn--unicode-sfpi-test.local | @             | SOA   | NULL          | 1080 |        NULL |   10800 |  7200 | 604800 |   86400 | 2013121002 | [email protected] | 192.168.4.110 |
    |  7 | xn--unicode-sfpi-test.local | @             | NS    | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    |  8 | xn--unicode-sfpi-test.local | @             | A     | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    |  9 | xn--unicode-sfpi-test.local | www           | CNAME | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    | 10 | xn--unicode-sfpi-test.local | openchangedev | A     | 192.168.4.110 | 1080 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL                  | NULL          |
    +----+-----------------------------+---------------+-------+---------------+------+-------------+---------+-------+--------+---------+------------+-----------------------+---------------+
    10 rows in set (0.00 sec)
    snippet from named.conf:

    NOTE: lines commented out AFTER including samba 4's named.conf - which just loads a shared object library

    Code:
    
    # dlz "Mysql zone" {
    #    database "mysql
    #    {host=192.168.4.110 port=3306 dbname=bind9_dlz user=root pass=one$breW}
    #    {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$'}";
    # };
    
    # this loads the correct samba shared object library to interface with the bind9 dlz instance
    include "/usr/local/samba/private/named.conf";
     

Share This Page