Hi all<br><br>I have deployed PDNS with the ldapbackend configured in strict mode using OpenLDAP slapd. I am unable to get pdns to return PTR records and despite reading the ldapbackend source and running both daemons with extreme verbosity, cannot seem to figure out why pdns is failing to find the associatedDomain/aRecord entries I have.<br>
<br>My host entries look like this:<br><br><span style="font-family:courier new,monospace">dn: dc=kingfisher,ou=aims,ou=computers,dc=aims,dc=ac,dc=za<br>aRecord: 192.168.42.2<br>dhcpHWAddress: ethernet 00:07:E9:06:98:F8<br>
dhcpStatements: fixed-address 192.168.42.2<br>objectClass: dNSDomain2<br>objectClass: dhcpHost<br>objectClass: domainRelatedObject<br>associatedDomain: <a href="http://firewall.aims.ac.za">firewall.aims.ac.za</a><br>associatedDomain: <a href="http://kingfisher-lan.aims.ac.za">kingfisher-lan.aims.ac.za</a><br>
associatedDomain: <a href="http://proxy.aims.ac.za">proxy.aims.ac.za</a><br>associatedDomain: <a href="http://wpad.aims.ac.za">wpad.aims.ac.za</a><br>dc: kingfisher<br>cn: kingfisher</span><br><br><br>I have an entry containing an SOA record for my reverse zone which looks like this:<br>
<br><span style="font-family:courier new,monospace">dn: dc=168.192.in-addr.arpa,ou=dns,dc=aims,dc=ac,dc=za<br>dc: 168.192.in-addr.arpa<br>sOARecord: <a href="http://ns1.aims.ac.za">ns1.aims.ac.za</a> <a href="mailto:hostmaster@aims.ac.za">hostmaster@aims.ac.za</a> 0 1200 300 86400 60<br>
associatedDomain: 168.192.in-addr.arpa<br>objectClass: dNSDomain2<br>objectClass: domainRelatedObject<br>nSRecord: <a href="http://thismachine.aims.ac.za">thismachine.aims.ac.za</a>.<br></span><br><br>My PDNS config looks like this:<br>
<span style="font-family:courier new,monospace"><br>launch=ldap<br>ldap-host=ldapi:///<br>ldap-method=strict<br>ldap-basedn=dc=aims,dc=ac,dc=za<br>ldap-filter-lookup=(&(:target:)(objectClass=dnsDomain2))<br>ldap-filter-axfr=(&(:target:)(objectClass=dnsDomain2))</span><br>
<br><br>Performing a reverse lookup such as: <span style="font-family:courier new,monospace">dig @localhost -x 192.168.42.2</span><br>Produces a failure like this:<br><br><span style="font-family:courier new,monospace">; <<>> DiG 9.8.1-P1 <<>> @melrose-lan -x 192.168.42.2<br>
; (1 server found)<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 861<br>;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0<br>;; WARNING: recursion requested but not available<br>
<br>;; QUESTION SECTION:<br>;2.42.168.192.in-addr.arpa. IN PTR<br><br>;; Query time: 3 msec<br>;; SERVER: 192.168.42.15#53(192.168.42.15)<br>;; WHEN: Thu Sep 27 17:08:04 2012<br>;; MSG SIZE rcvd: 43<br></span><br>
<br>
Running slapd in debug mode reveals the following queries being made, in this order (apologies for the verbosity):<br><br><span style="font-family:courier new,monospace">50646bd4 connection_get(18)<br>=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br>
<= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>
50646bd4 filter: (&(aRecord=192.168.42.2)(objectClass=dNSDomain2))<br>50646bd4 attrs:50646bd4 associatedDomain50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>
50646bd4 bdb_idl_fetch_key: [fc094c20]<br>50646bd4 bdb_idl_fetch_key: [1eb06af0]<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br>50646bd4 connection_get(26)<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br>
50646bd4 connection_get(18)<br>=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br><= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>
50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>50646bd4 filter: (&(&(associatedDomain=42.168.192.in-addr.arpa)(sOARecord=*))(objectClass=dNSDomain2))<br>50646bd4 attrs:50646bd4 SOARecord50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>
50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>50646bd4 connection_get(27)<br>50646bd4 bdb_idl_fetch_key: [152cb869]<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br>
50646bd4 send_ldap_result: err=0 matched="" text=""<br>50646bd4 connection_get(18)<br>=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br><= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>
=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>50646bd4 filter: (&(&(associatedDomain=168.192.in-addr.arpa)(sOARecord=*))(objectClass=dNSDomain2))<br>
50646bd4 attrs:50646bd4 SOARecord50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>50646bd4 bdb_idl_fetch_key: [e3d386be]<br>50646bd4 bdb_idl_fetch_key: [1eb06af0]<br>
50646bd4 send_ldap_result: err=0 matched="" text=""<br>50646bd4 connection_get(18)<br>=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br><= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>
=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>50646bd4 filter: (&(&(associatedDomain=192.in-addr.arpa)(sOARecord=*))(objectClass=dNSDomain2))<br>
50646bd4 attrs:50646bd4 SOARecord50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>50646bd4 bdb_idl_fetch_key: [4cbdcab0]<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br>
50646bd4 connection_get(18)<br>=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br><= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>
50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>50646bd4 filter: (&(&(associatedDomain=in-addr.arpa)(sOARecord=*))(objectClass=dNSDomain2))<br>50646bd4 attrs:50646bd4 SOARecord50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>
50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>50646bd4 bdb_idl_fetch_key: [8268109f]<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br>50646bd4 connection_get(18)<br>
=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br><= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>
50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>50646bd4 filter: (&(&(associatedDomain=arpa)(sOARecord=*))(objectClass=dNSDomain2))<br>50646bd4 attrs:50646bd4 SOARecord50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>
50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>50646bd4 bdb_idl_fetch_key: [1de355a4]<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br>50646bd4 connection_get(18)<br>
=> ldap_bv2dn(dc=aims,dc=ac,dc=za,0)<br><= ldap_bv2dn(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>=> ldap_dn2bv(272)<br><= ldap_dn2bv(dc=aims,dc=ac,dc=za)=0 <br>
50646bd4 SRCH "dc=aims,dc=ac,dc=za" 2 350646bd4 0 0 0<br>50646bd4 filter: (&(&(associatedDomain=)(sOARecord=*))(objectClass=dNSDomain2))<br>50646bd4 attrs:50646bd4 SOARecord50646bd4 dNSTTL50646bd4 modifyTimestamp50646bd4 <br>
50646bd4 bdb_idl_fetch_key: [01872a84]<br>50646bd4 bdb_idl_fetch_key: [b49d1940]<br>50646bd4 bdb_idl_fetch_key: [898e58f3]<br>50646bd4 send_ldap_result: err=0 matched="" text=""<br></span><br><br>I am quite stuck in trying to figure this one out. Due to the repeated queries it looks like pdns isn't finding the SOA record but when I perform the same ldapsearch manually the entries are indeed returned. Can anyone offer me some clues?<br>
<br>Many thanks<br>Tom Bamford<br clear="all"><br>-- <br><font size="1">System Administrator<br>African Institute for Mathematical Sciences <br>Cape Town, South Africa<br>Tel: +27 (0)21 787 9328<br>Fax: +27 (0)21 787 9321<br>
Jabber: <a href="mailto:tom@aims.ac.za" target="_blank">tom@aims.ac.za</a><br>Web: <a href="http://www.aims.ac.za/" target="_blank">www.aims.ac.za</a></font><br><br><br>