4 May 2008 09:03
Re: Bind-9.4.2 DLZ LDAP
mirghany <mirghany <at> seven7s.net>
2008-05-04 07:03:15 GMT
2008-05-04 07:03:15 GMT
Rob Butler wrote:
Here are kindly find named.conf LDAP section.
dlz "ldap zone" {
database "ldap 1 v3 simple
{cn=mirghany,o=bind-dlz} {mirghany} {127.0.0.1}
ldap:///dlzZoneName=%zone%,ou=dns,o=bind-dlz???objectclass=dlzZone
ldap:///dlzHostName=%record%,dlzZoneName=%zone%,ou=dns,o=bind-dlz?dlzTTL,dlzType,dlzPreference,dlzData,dlzIPAddr,dlzPrimaryNS,dlzAdminEmail,dlzSerial,dlzRefresh,dlzRetry,dlzExpire,dlzMinimum?sub?objectclass=dlzAbstractRecord";
};
Also the normal LDAP search result:
Command : ldapsearch -x -h 127.0.0.1 -D"cn=mirghany,o=bind-dlz" -w mirghany -b"o=bind-dlz"
Result:
# extended LDIF
#
# LDAPv3
# base <o=bind-dlz> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# bind-dlz
dn: o=bind-dlz
objectClass: organization
o: bind-dlz
# dns, bind-dlz
dn: ou=dns,o=bind-dlz
objectClass: organizationalUnit
ou: dns
# example.com, dns, bind-dlz
dn: dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzZone
dlzZoneName: example.com
# <at> , example.com, dns, bind-dlz
dn: dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: <at>
# www, example.com, dns, bind-dlz
dn: dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: www
# mail, example.com, dns, bind-dlz
dn: dlzHostName=mail,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: mail
# backup, example.com, dns, bind-dlz
dn: dlzHostName=backup,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: backup
# ns1, example.com, dns, bind-dlz
dn: dlzHostName=ns1,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: ns1
# ns2, example.com, dns, bind-dlz
dn: dlzHostName=ns2,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: ns2
# ~, example.com, dns, bind-dlz
dn: dlzHostName=~,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: ~
# 1, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=1,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzGenericRecord
dlzRecordID: 1
dlzHostName: <at>
dlzType: txt
dlzData: "this is a text record"
dlzTTL: 10
# 2, www, example.com, dns, bind-dlz
dn: dlzRecordID=2,dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 2
dlzHostName: www
dlzType: a
dlzIPAddr: 192.168.0.1
dlzTTL: 10
# 3, mail, example.com, dns, bind-dlz
dn: dlzRecordID=3,dlzHostName=mail,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 3
dlzHostName: mail
dlzType: a
dlzIPAddr: 192.168.0.2
dlzTTL: 10
# 4, backup, example.com, dns, bind-dlz
dn: dlzRecordID=4,dlzHostName=backup,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 4
dlzHostName: backup
dlzType: a
dlzIPAddr: 192.168.0.3
dlzTTL: 10
# 5, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=5,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 5
dlzHostName: <at>
dlzType: mx
dlzData: mail
dlzPreference: 20
dlzTTL: 10
# 6, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=6,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 6
dlzHostName: <at>
dlzType: mx
dlzData: backup
dlzPreference: 40
dlzTTL: 10
# 7, www, example.com, dns, bind-dlz
dn: dlzRecordID=7,dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 7
dlzHostName: www
dlzType: mx
dlzData: backup
dlzPreference: 40
dlzTTL: 10
# 8, www, example.com, dns, bind-dlz
dn: dlzRecordID=8,dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 8
dlzHostName: www
dlzType: mx
dlzData: mail
dlzPreference: 20
dlzTTL: 10
# 9, ns1, example.com, dns, bind-dlz
dn: dlzRecordID=9,dlzHostName=ns1,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 9
dlzHostName: ns1
dlzType: a
dlzIPAddr: 192.168.0.4
dlzTTL: 10
# 10, ns2, example.com, dns, bind-dlz
dn: dlzRecordID=10,dlzHostName=ns2,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 10
dlzHostName: ns2
dlzType: a
dlzIPAddr: 192.168.0.5
dlzTTL: 10
# 11, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=11,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzSOARecord
dlzRecordID: 11
dlzHostName: <at>
dlzType: soa
dlzSerial: 2
dlzRefresh: 2800
dlzRetry: 7200
dlzExpire: 604800
dlzMinimum: 86400
dlzAdminEmail: root.example.com.
dlzPrimaryNS: ns1.example.com.
dlzTTL: 10
# 12, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=12,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzNSRecord
dlzRecordID: 12
dlzHostName: <at>
dlzType: ns
dlzData: ns1.example.com.
dlzTTL: 10
# 13, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=13,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzNSRecord
dlzRecordID: 13
dlzHostName: <at>
dlzType: ns
dlzData: ns2
dlzTTL: 10
# 14, ~, example.com, dns, bind-dlz
dn: dlzRecordID=14,dlzHostName=~,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 14
dlzHostName: ~
dlzType: a
dlzIPAddr: 192.168.0.250
dlzTTL: 10
# 15, example.com, dns, bind-dlz
dn: dlzRecordID=15,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzXFR
dlzRecordID: 15
dlzIPAddr: 127.0.0.1
# search result
search: 2
result: 0 Success
# numResponses: 26
# numEntries: 25
BR
-- Ahmed El-Mirghany Senior Systems Engineer RHCE,LPI T. E. Data Mobile +2(010)1608655 E-Mail: mirghany <at> seven7s.net
Dear ,your LDAP query isn't correct for the lookup query. Post the DLZ section of your named.conf so we can help find the error.
Rob----- Original Message ----
From: mirghany <mirghany <at> seven7s.net>
To: bind-dlz-testers <at> lists.sourceforge.net
Sent: Wednesday, April 30, 2008 8:55:01 AM
Subject: [Bind-dlz-testers] Bind-9.4.2 DLZ LDAP
Dear , I tried to test bind-9.4.2 with DLZ and LDAP. I recompile bind with DLZ LDAP option. LDAP ...> OpenLDAP: slapd 2.3.27 and follow the example on http://bind-dlz.sourceforge.net/ldap_example.html LDAP seems to be up and running also ldapsearch ok. when I tried to start bind with named -c /etc/named.conf -d 20 -u named -g I've got these logs: [root <at> bindldap ~]# named -c /etc/named.conf -d 20 -u named -g 30-Apr-2008 09:28:03.835 starting BIND 9.4.2 -c /etc/named.conf -d 20 -u named -g 30-Apr-2008 09:28:03.836 found 1 CPU, using 1 worker thread 30-Apr-2008 09:28:03.836 Registering DLZ ldap driver. 30-Apr-2008 09:28:03.837 Registering SDLZ driver 'ldap' 30-Apr-2008 09:28:03.837 Registering DLZ driver 'ldap' 30-Apr-2008 09:28:03.843 loading configuration from '/etc/named.conf' 30-Apr-2008 09:28:03.845 set maximum stack size to 4294967295: success 30-Apr-2008 09:28:03.845 set maximum data size to 4294967295: success 30-Apr-2008 09:28:03.845 set maximum core size to 4294967295: success 30-Apr-2008 09:28:03.845 set maximum open files to 1024: success 30-Apr-2008 09:28:03.846 listening on IPv4 interface lo, 127.0.0.1#53 30-Apr-2008 09:28:03.846 clientmgr <at> 0xb7f7e008: create 30-Apr-2008 09:28:03.848 socket 0xb7f7eec8: created 30-Apr-2008 09:28:03.849 clientmgr <at> 0xb7f7e008: createclients 30-Apr-2008 09:28:03.849 clientmgr <at> 0xb7f7e008: create new 30-Apr-2008 09:28:03.850 client <at> 0xb6113008: create 30-Apr-2008 09:28:03.851 socket 0xb7f80008: created 30-Apr-2008 09:28:03.851 clientmgr <at> 0xb7f7e008: createclients 30-Apr-2008 09:28:03.851 clientmgr <at> 0xb7f7e008: create new 30-Apr-2008 09:28:03.852 client <at> 0xb60d2008: create 30-Apr-2008 09:28:03.853 listening on IPv4 interface eth0, 212.103.160.190#53 30-Apr-2008 09:28:03.853 clientmgr <at> 0xb7f7e1e0: create 30-Apr-2008 09:28:03.853 socket 0xb7f80148: created 30-Apr-2008 09:28:03.854 clientmgr <at> 0xb7f7e1e0: createclients 30-Apr-2008 09:28:03.854 clientmgr <at> 0xb7f7e1e0: create new 30-Apr-2008 09:28:03.855 client <at> 0xb6091008: create 30-Apr-2008 09:28:03.855 socket 0xb7f80288: created 30-Apr-2008 09:28:03.856 clientmgr <at> 0xb7f7e1e0: createclients 30-Apr-2008 09:28:03.856 clientmgr <at> 0xb7f7e1e0: create new 30-Apr-2008 09:28:03.857 client <at> 0xb6050008: create 30-Apr-2008 09:28:03.860 Loading 'ldap zone' using driver ldap 30-Apr-2008 09:28:03.861 Loading SDLZ driver. 30-Apr-2008 09:28:03.861 LDAP driver running multithreaded 30-Apr-2008 09:28:03.861 lookup query must specify a search base 30-Apr-2008 09:28:03.861 SDLZ driver failed to load. 30-Apr-2008 09:28:03.862 DLZ driver failed to load. 30-Apr-2008 09:28:03.862 calling free_rbtdb(.) 30-Apr-2008 09:28:03.862 done free_rbtdb(.) 30-Apr-2008 09:28:03.863 load_configuration: failure 30-Apr-2008 09:28:03.863 loading configuration: failure 30-Apr-2008 09:28:03.863 exiting (due to fatal error) Any one have an Idea about that error in RED. Also note when I tcpdump I could not find any trial from bind to communicate with LDAP even local server or another remote one. otherwise ldapsearch did. Thanks
-- Ahmed El-Mirghany Senior Systems Engineer RHCE,LPI T. E. Data Mobile +2(010)1608655 E-Mail: mirghany <at> seven7s.net
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Bind-dlz-testers mailing list Bind-dlz-testers <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
Here are kindly find named.conf LDAP section.
dlz "ldap zone" {
database "ldap 1 v3 simple
{cn=mirghany,o=bind-dlz} {mirghany} {127.0.0.1}
ldap:///dlzZoneName=%zone%,ou=dns,o=bind-dlz???objectclass=dlzZone
ldap:///dlzHostName=%record%,dlzZoneName=%zone%,ou=dns,o=bind-dlz?dlzTTL,dlzType,dlzPreference,dlzData,dlzIPAddr,dlzPrimaryNS,dlzAdminEmail,dlzSerial,dlzRefresh,dlzRetry,dlzExpire,dlzMinimum?sub?objectclass=dlzAbstractRecord";
};
Also the normal LDAP search result:
Command : ldapsearch -x -h 127.0.0.1 -D"cn=mirghany,o=bind-dlz" -w mirghany -b"o=bind-dlz"
Result:
# extended LDIF
#
# LDAPv3
# base <o=bind-dlz> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# bind-dlz
dn: o=bind-dlz
objectClass: organization
o: bind-dlz
# dns, bind-dlz
dn: ou=dns,o=bind-dlz
objectClass: organizationalUnit
ou: dns
# example.com, dns, bind-dlz
dn: dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzZone
dlzZoneName: example.com
# <at> , example.com, dns, bind-dlz
dn: dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: <at>
# www, example.com, dns, bind-dlz
dn: dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: www
# mail, example.com, dns, bind-dlz
dn: dlzHostName=mail,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: mail
# backup, example.com, dns, bind-dlz
dn: dlzHostName=backup,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: backup
# ns1, example.com, dns, bind-dlz
dn: dlzHostName=ns1,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: ns1
# ns2, example.com, dns, bind-dlz
dn: dlzHostName=ns2,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: ns2
# ~, example.com, dns, bind-dlz
dn: dlzHostName=~,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzHost
dlzHostName: ~
# 1, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=1,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzGenericRecord
dlzRecordID: 1
dlzHostName: <at>
dlzType: txt
dlzData: "this is a text record"
dlzTTL: 10
# 2, www, example.com, dns, bind-dlz
dn: dlzRecordID=2,dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 2
dlzHostName: www
dlzType: a
dlzIPAddr: 192.168.0.1
dlzTTL: 10
# 3, mail, example.com, dns, bind-dlz
dn: dlzRecordID=3,dlzHostName=mail,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 3
dlzHostName: mail
dlzType: a
dlzIPAddr: 192.168.0.2
dlzTTL: 10
# 4, backup, example.com, dns, bind-dlz
dn: dlzRecordID=4,dlzHostName=backup,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 4
dlzHostName: backup
dlzType: a
dlzIPAddr: 192.168.0.3
dlzTTL: 10
# 5, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=5,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 5
dlzHostName: <at>
dlzType: mx
dlzData: mail
dlzPreference: 20
dlzTTL: 10
# 6, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=6,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 6
dlzHostName: <at>
dlzType: mx
dlzData: backup
dlzPreference: 40
dlzTTL: 10
# 7, www, example.com, dns, bind-dlz
dn: dlzRecordID=7,dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 7
dlzHostName: www
dlzType: mx
dlzData: backup
dlzPreference: 40
dlzTTL: 10
# 8, www, example.com, dns, bind-dlz
dn: dlzRecordID=8,dlzHostName=www,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzMXRecord
dlzRecordID: 8
dlzHostName: www
dlzType: mx
dlzData: mail
dlzPreference: 20
dlzTTL: 10
# 9, ns1, example.com, dns, bind-dlz
dn: dlzRecordID=9,dlzHostName=ns1,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 9
dlzHostName: ns1
dlzType: a
dlzIPAddr: 192.168.0.4
dlzTTL: 10
# 10, ns2, example.com, dns, bind-dlz
dn: dlzRecordID=10,dlzHostName=ns2,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 10
dlzHostName: ns2
dlzType: a
dlzIPAddr: 192.168.0.5
dlzTTL: 10
# 11, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=11,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzSOARecord
dlzRecordID: 11
dlzHostName: <at>
dlzType: soa
dlzSerial: 2
dlzRefresh: 2800
dlzRetry: 7200
dlzExpire: 604800
dlzMinimum: 86400
dlzAdminEmail: root.example.com.
dlzPrimaryNS: ns1.example.com.
dlzTTL: 10
# 12, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=12,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzNSRecord
dlzRecordID: 12
dlzHostName: <at>
dlzType: ns
dlzData: ns1.example.com.
dlzTTL: 10
# 13, <at> , example.com, dns, bind-dlz
dn: dlzRecordID=13,dlzHostName= <at> ,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzNSRecord
dlzRecordID: 13
dlzHostName: <at>
dlzType: ns
dlzData: ns2
dlzTTL: 10
# 14, ~, example.com, dns, bind-dlz
dn: dlzRecordID=14,dlzHostName=~,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzARecord
dlzRecordID: 14
dlzHostName: ~
dlzType: a
dlzIPAddr: 192.168.0.250
dlzTTL: 10
# 15, example.com, dns, bind-dlz
dn: dlzRecordID=15,dlzZoneName=example.com,ou=dns,o=bind-dlz
objectClass: dlzXFR
dlzRecordID: 15
dlzIPAddr: 127.0.0.1
# search result
search: 2
result: 0 Success
# numResponses: 26
# numEntries: 25
BR
-- Ahmed El-Mirghany Senior Systems Engineer RHCE,LPI T. E. Data Mobile +2(010)1608655 E-Mail: mirghany <at> seven7s.net
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________ Bind-dlz-testers mailing list Bind-dlz-testers <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
RSS Feed