zone2ldap
This hacky script reads DNS master file (RFC 1035 section 5) and outputs LDIF file with data suitable for bind-dyndb-ldap plugin.
Usage
zone2dyndb-ldif.py <zone file> <zone origin> <LDAP DNS base>Example
- 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"
How to get the DN in your FreeIPA LDAP tree
-
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
ipaDNSContainerldapsearch objectClass=ipaDNSContainer dn
Depedencies
- DNSpython: http://dnspython.org/ (Fedora package python-dns)
- python-ldap: http://www.python-ldap.org/ (Fedora package python-ldap)
Useful links
- 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/