Bind-dyndb-ldap offers an option to automatically synchronize PTR
records when A
/AAAA
records are changed.
This chapter shows how to enable PTR
record synchronization via
FreeIPA‘s command line interface.
Everything can be done directly in LDAP, see next chapter for all the
gory details.
Enable dynamic updates for forward zone.
$ ipa dnszone-mod example.com. --dynamic-update=TRUE
$ ipa dnszone-mod example.com. --update-policy='grant EXAMPLE.COM krb5-self * A; grant EXAMPLE.COM krb5-self * AAAA; grant EXAMPLE.COM krb5-self * SSHFP;'
Enable PTR record synchronization in forward zone:
$ ipa dnszone-mod example.com. --allow-sync-ptr=TRUE
Enable dynamic updates in reverse zone:
$ ipa dnszone-mod 2.0.192.in-addr.arpa. --dynamic-update=TRUE
This synchronization is done only if all following conditions are fulfilled:
Forward and reverse zones are hosted on the same server inside the same bind-dyndb-ldap instance.
dynamic-db
section of /etc/named.conf
.A
/AAAA
record is modified via DNS Dynamic
Update.
Dynamic Update is enabled for forward and also reverse zone.
Bind-dyndb-ldap has special boolean option which enables or disables dynamic updates. This option can be configured on two places (ordered by descending priority):
idnsAllowDynUpdate
attribute in zone objectipa dnszone-mod --dynamic-update=TRUE
dyn_update
option in
/etc/named.conf
Update
policy
(2)
has to allow A
or AAAA
record update in forward zone at
least. Update policy in reverse zone doesn’t matter.
FreeIPA’s default update policy for forward zones is:
grant EXAMPLE.COM krb5-self * A; grant EXAMPLE.COM krb5-self * AAAA; grant EXAMPLE.COM krb5-self * SSHFP;
where EXAMPLE.COM
is your Kerberos REALM.
PTR record synchronization is enabled for forward zone.
idnsAllowSyncPTR
attribute in the zone objectipa dnszone-mod --allow-sync-ptr=TRUE
idnsAllowSyncPTR
attribute in
global configuration objectbase
option in /etc/named.conf
ipa dnsconfig-mod --allow-sync-ptr=TRUE
sync_ptr
option in
/etc/named.conf
Existing values in A
/AAAA
and PTR
records matches. For
example:
example.com. A 192.0.2.1
=> PTR
record
1.2.0.192.in-addr.arpa.
has to not exist.example.com. A 192.0.2.1
=> PTR
record 1.2.0.192.in-addr.arpa.
has to have value
example.com.
SERVFAIL
is returned to the client if the A
/AAAA
update
succeeded and PTR
record synchronization is enabled but the
synchronization was unsuccessful.
Versions <= 3.1 had very poor error reporting. Newer versions log
detailed error messages to usual places (as configured in
/etc/named.conf
).
This feature, when enabled, has some impact to security of DNS dynamic updates.
IP addresses in A
/AAAA
records sent by clients are not checked
in any way. As a result, an client can create PTR
record which
points to client’s name even if the client do not hold the particular IP
address.
Overall impact depends on update policy applied to forward zone. You should carefully think about your update policy and interaction with checks done by bind-dyndb-ldap.
Another option is to do PTR synchronization directly from clients. This method requires a client which is able to update A and PTR records separately. (Of course, you can prepare hand made script or something similar.)
See discussion about this possibility.
Configure reverse zone with update policy tcp-self
.
$ ipa dnszone-mod 2.0.192.in-addr.arpa --dynamic-update=TRUE
$ ipa dnszone-mod 2.0.192.in-addr.arpa --update-policy='grant * tcp-self *;'
Now the client has to do dynamic update over TCP, note the -v
parameter.
$ nsupdate -v
debug
update delete 1.2.0.192.in-addr.arpa. 1200 IN PTR
update add 1.2.0.192.in-addr.arpa. 1200 IN PTR client1.example.com.
send