Define realms in the DNS database to resolve host names.
Network authentication service allows you to use the DNS server to resolve host names. To do this, you need to add a server (SRV) record and text (TXT) record for each key distribution center in the realm. The Kerberos protocol searches for an SRV record using the realm name as the DNS search name.
To define realms with DNS, complete the following steps:
service.protocol.realm TTL class SRV priority weight port target
The _kerberos service entries define KDC instances, and _kpasswd service entries define password change service instances.
Entries are tried in priority order (0 is the highest priority). Entries with the same priority are tried in random order. The _udp protocol records are required for _kerberos and _kpasswd entries.
service.name TTL class TXT realm
For our configuration example, you can define the example KDCs for the two realms by adding the following records:
_kerberos._udp.deptxyz.bogusname.com IN SRV 0 0 88 kdc1.deptxyz.bogusname.com
_kerberos._tcp.deptxyz.bogusname.com IN SRV 0 0 88 kdc1.deptxyz.bogusname.com
_kerberos._udp.deptabc.bogusname.com IN SRV 0 0 88 kdc2.deptabc.bogusname.com
_kerberos._tcp.deptabc.bogusname.com IN SRV 0 0 88 kdc2.deptabc.bogusname.com
_kpasswd._udp.deptxyz.bogusname.com IN SRV 0 0 464 kdc1.deptxyz.bogusname.com
_kpasswd._tcp.deptxyz.bogusname.com IN SRV 0 0 464 kdc1.deptxyz.bogusname.com
_kpasswd._udp.deptabc.bogusname.com IN SRV 0 0 464 kdc2.deptxyz.bogusname.com
_kpasswd._tcp.deptabc.bogusname.com IN SRV 0 0 464 kdc2.deptxyz.bogusname.com
For our configuration example, following the general form of a Kerberos TXT record, we can associate hosts in the deptxyz and deptabc domains to their respective realms with the following statements:
_kerberos.deptxyz.bogusname.com IN TXT DEPTXYZ.BOGUSNAME.COM
_kerberos.deptabc.bogusname.com IN TXT DEPTABC.BOGUSNAME.COM
Following is a sample krb5.conf configuration file that specifies using DNS lookup:
Sample krb5.conf configuration file
; krb5.conf - Kerberos V5 configuration file DO NOT REMOVE THIS LINE ;
[libdefaults]
; The default_realm value ;-default_realm = REALM1.ROCHESTER.IBM.COM default_realm = DEPTXYZ.BOGUSNAME.COM
; define the system to use DNS lookup use_dns_lookup = 1
[realms] ; ; We could configure the same realm information here, but it would ; only be used if the DNS lookup failed. ;
[domain_realm] ; Convert host names to realm names. Individual host names may be ; specified. Domain suffixes may be specified with a leading period ; and will apply to all host names ending in that suffix. ; ; We will use DNS to resolve what realm a given host name belongs to. ;
[capaths] ; Configurable authentication paths define the trust relationships ; between client and servers. Each entry represents a client realm ; and consists of the trust relationships for each server that can ; be accessed from that realm. A server may be listed multiple times ; if multiple trust relationships are involved. Specify '.' for ; a direct connection. ;-REALM1.ROCHESTER.IBM.COM = { ;- REALM2.ROCHESTER.IBM.COM = . ;;} DEPTXYZ.BOGUSNAME.COM = { DEPTABC.BOGUSNAME.COM = . }