4.4.2. Configuring Dynamic DNS Update with TSIG Authentication
You can configure an IdM server to use the secret key transaction authentication for DNS (TSIG) technology that uses the rndc.key
key file for authentication. The TSIG protocol is defined in RFC2845.
Prerequisites
- You must ensure the IdM server is deployed and the host-based firewall is configured correctly. For more information, see Port Requirements in the Linux Domain Identity, Authentication, and Policy Guide.
-
You must obtain
root
user access on the IdM server. - You must confirm whether Satellite Server or Capsule Server is configured to provide DNS service for your deployment.
- You must configure DNS, DHCP and TFTP services on the base operating system of either the Satellite or Capsule that is managing the DNS service for your deployment.
- You must create a backup of the answer file. You can use the backup to restore the answer file to its original state if it becomes corrupted. For more information, see Configuring Satellite Server.
Procedure
To configure dynamic DNS update with TSIG authentication, complete the following steps:
Enabling External Updates to the DNS Zone in the IdM Server
On the IdM Server, add the following to the top of the
/etc/named.conf
file:include "/etc/rndc.key"; controls { inet IdM_Server_IP_Address port 953 allow { Satellite_IP_Address; } keys { "rndc-key"; }; };
include "/etc/rndc.key"; controls { inet IdM_Server_IP_Address port 953 allow { Satellite_IP_Address; } keys { "rndc-key"; }; }; include "/etc/rndc.key"; controls { inet IdM_Server_IP_Address port 953 allow { Satellite_IP_Address; } keys { "rndc-key"; }; }; include "/etc/rndc.key"; controls { inet IdM_Server_IP_Address port 953 allow { Satellite_IP_Address; } keys { "rndc-key"; }; }; include "/etc/rndc.key"; controls { inet IdM_Server_IP_Address port 953 allow { Satellite_IP_Address; } keys { "rndc-key"; }; }; include "/etc/rndc.key"; controls { inet IdM_Server_IP_Address port 953 allow { Satellite_IP_Address; } keys { "rndc-key"; }; };
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the
named
service to make the changes take effect:systemctl reload named
# systemctl reload named
Copy to Clipboard Copied! Toggle word wrap Toggle overflow In the IdM web UI, navigate to Network Services > DNS > DNS Zones and click the name of the zone. In the Settings tab, apply the following changes:
Add the following in the
BIND update policy
box:grant "rndc-key" zonesub ANY;
grant "rndc-key" zonesub ANY;
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set Dynamic update to True.
- Click Update to save the changes.
Copy the
/etc/rndc.key
file from the IdM server to the base operating system of your Satellite Server. Enter the following command:scp /etc/rndc.key root@satellite.example.com:/etc/rndc.key
# scp /etc/rndc.key root@satellite.example.com:/etc/rndc.key
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To set the correct ownership, permissions, and SELinux context for the
rndc.key
file, enter the following command:restorecon -v /etc/rndc.key chown -v root:named /etc/rndc.key chmod -v 640 /etc/rndc.key
# restorecon -v /etc/rndc.key # chown -v root:named /etc/rndc.key # chmod -v 640 /etc/rndc.key
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Assign the
foreman-proxy
user to thenamed
group manually. Normally, satellite-installer ensures that theforeman-proxy
user belongs to thenamed
UNIX group, however, in this scenario Satellite does not manage users and groups, therefore you need to assign theforeman-proxy
user to thenamed
group manually.usermod -a -G named foreman-proxy
# usermod -a -G named foreman-proxy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, enter the following
satellite-installer
command to configure Satellite to use the external DNS server:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Testing External Updates to the DNS Zone in the IdM Server
Install the
bind-utils
utility:yum install bind-utils
# yum install bind-utils
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the key in the
/etc/rndc.key
file on Satellite Server is the same key file that is used on the IdM server:key "rndc-key" { algorithm hmac-md5; secret "secret-key=="; };
key "rndc-key" { algorithm hmac-md5; secret "secret-key=="; };
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, create a test DNS entry for a host. For example, host
test.example.com
with an A record of192.168.25.20
on the IdM server at192.168.25.1
.echo -e "server 192.168.25.1\n \ update add test.example.com 3600 IN A 192.168.25.20\n \ send\n" | nsupdate -k /etc/rndc.key
# echo -e "server 192.168.25.1\n \ update add test.example.com 3600 IN A 192.168.25.20\n \ send\n" | nsupdate -k /etc/rndc.key
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, test the DNS entry:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To view the entry in the IdM web UI, navigate to Network Services > DNS > DNS Zones. Click the name of the zone and search for the host by name.
If resolved successfully, remove the test DNS entry:
echo -e "server 192.168.25.1\n \ update delete test.example.com 3600 IN A 192.168.25.20\n \ send\n" | nsupdate -k /etc/rndc.key
# echo -e "server 192.168.25.1\n \ update delete test.example.com 3600 IN A 192.168.25.20\n \ send\n" | nsupdate -k /etc/rndc.key
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm that the DNS entry was removed:
nslookup test.example.com 192.168.25.1
# nslookup test.example.com 192.168.25.1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The above
nslookup
command fails and returns theSERVFAIL
error message if the record was successfully deleted.