This hacky script reads DNS master file (RFC 1035 section 5) and outputs LDIF file with data suitable for bind-dyndb-ldap plugin.
zone2dyndb-ldif.py <zone file> <zone origin> <LDAP DNS base>
- Zone (master) file:
/var/named/zone.example.com.db
- Zone name (origin):
zone.example.com.
- DN of DNS container in your LDAP tree:
"cn=dns, dc=ipa, dc=example, dc=com"
- This example corresponds to FreeIPA domain
"ipa.example.com."
- This example corresponds to FreeIPA domain
- Command:
zone2dyndb-ldif.py /var/named/zone.example.com.db zone.example.com. "cn=dns, dc=ipa, dc=example, dc=com"
-
If needed create a kerberos ticket
# admin can be replaced with a user of course kinit admin
-
Run a search against your ldap for the
ipaDNSContainer
ldapsearch objectClass=ipaDNSContainer dn
- DNSpython: http://dnspython.org/ (Fedora package python-dns)
- python-ldap: http://www.python-ldap.org/ (Fedora package python-ldap)
- bind-dyndb-ldap - LDAP backend for BIND 9: https://fedorahosted.org/bind-dyndb-ldap/
- FreeIPA - domain controller for Linux/Unix world: http://www.freeipa.org/