Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 29. Securing DNS with DoT in IdM
You can secure DNS traffic in Identity Management (IdM) deployments by enabling encrypted DNS (eDNS) that uses DNS-over-TLS (DoT). You can encrypt all DNS queries and responses between DNS clients and IdM DNS servers.
Encrypted DNS in IdM is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
29.1. Encrypted DNS in IdM Link kopierenLink in die Zwischenablage kopiert!
Encrypted DNS (eDNS), using DNS over TLS (DoT), encrypts all DNS queries and responses between IdM DNS clients and servers. IdM configures the unbound service as a local caching resolver on clients and uses the BIND service to receive DoT requests on servers.
By default, IdM uses the relaxed DNS policy, which allows fallback to unencrypted DNS if DoT is unavailable. When using the relaxed policy, IdM clients and replicas automatically detect DoT-capable DNS servers during installation.
For encrypted-only communication, you can configure the --dns-policy enforced option. This setting strictly requires DoT for all DNS resolution and rejects any unencrypted requests. Before installation, you must manually preconfigure both client and replica systems to trust the IdM server’s DoT certificate and use it for eDNS resolution.
IdM provides an optional integrated DNS server. When you use the integrated DNS server, IdM automatically manages SRV and other service records as you modify the topology. If you require advanced features such as DNS views, you can manage your DNS records manually on an external DNS server. The integrated IdM DNS is not a general-purpose DNS solution.
When setting up eDNS for your IdM servers, replicas, and clients, you can either use the IdM Certificate Authority (CA) service for certificate management or provide your own certificates. If you don’t provide a certificate, IdM CA automatically generates and assigns TLS certificates for the DNS service.
29.2. Installing an IdM server configured to use eDNS Link kopierenLink in die Zwischenablage kopiert!
You can install an IdM server with DoT enabled by performing a non-interactive installation using the ipa-server-install utility. This procedure describes how to configure DoT with the enforced policy using the integrated DNS service. If you require the relaxed policy instead, you can skip the steps for pre-configuring clients and replicas for DoT exclusively, as the IdM server automatically discovers them.
You can use a certificate issued by the integrated IdM Certificate Authority (CA) or provide a custom certificate issued by an external CA. If you do not provide a certificate, the IdM CA automatically issues a DoT certificate during the installation.
Prerequisites
- Review the steps outlined in Preparing the system for IdM server installation.
-
For
enforcedDoT, complete the steps in Configuring client and replica systems to use DoT exclusively. Ensure the following packages are installed:
-
ipa-server -
ipa-server-dns -
ipa-server-encrypted-dns ipa-client-encrypted-dnsImportantThe
ipa-server-encrypted-dnspackage requires a newer version of thebind-utilspackage than the version installed by default on RHEL. Runsudo dnf install ipa-server ipa-server-encrypted-dns --allowerasingto allow the package manager to remove the olderbind-utilspackage and install the version required byipa-server-encrypted-dns.
-
Procedure
Add the
dns-over-tlsservice to the systemfirewallto open port 853/TCP for DoT traffic:firewall-cmd --add-service=dns-over-tls
# firewall-cmd --add-service=dns-over-tlsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: To use a custom PEM-formatted certificate and key for DoT issued by an external certificate authority, create the files:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the IdM server with integrated DNS:
If you do not strictly require DoT, you can omit the --dns-policy option. The installer then uses the default relaxed policy.
To install the IdM server with externally issued keys and certificates, specify the certificate and key paths:
ipa-server-install --setup-dns --dns-over-tls --dot-forwarder "<server_ip>#<dns_server_hostname>" --dns-policy enforced --dns-over-tls-cert /etc/pki/tls/certs/certificate.pem --dns-over-tls-key /etc/pki/tls/certs/privkey.pem --no-dnssec-validation --auto-reverse --domain <domain_name> --realm <realm_name> --hostname <idm_server_fqdn> -p <admin_password> -a <admin_password> -U
# ipa-server-install --setup-dns --dns-over-tls --dot-forwarder "<server_ip>#<dns_server_hostname>" --dns-policy enforced --dns-over-tls-cert /etc/pki/tls/certs/certificate.pem --dns-over-tls-key /etc/pki/tls/certs/privkey.pem --no-dnssec-validation --auto-reverse --domain <domain_name> --realm <realm_name> --hostname <idm_server_fqdn> -p <admin_password> -a <admin_password> -UCopy to Clipboard Copied! Toggle word wrap Toggle overflow To install the IdM server with the integrated IdM CA, run the following command:
ipa-server-install --setup-dns --dns-over-tls --dot-forwarder "<server_ip>#<dns_server_hostname>" --dns-policy enforced --no-dnssec-validation --auto-reverse --domain <domain_name> --realm <realm_name> --hostname <idm_server_fqdn> -p <admin_password> -a <admin_password> -U
# ipa-server-install --setup-dns --dns-over-tls --dot-forwarder "<server_ip>#<dns_server_hostname>" --dns-policy enforced --no-dnssec-validation --auto-reverse --domain <domain_name> --realm <realm_name> --hostname <idm_server_fqdn> -p <admin_password> -a <admin_password> -UCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Troubleshooting
Enable detailed logging for the
unboundservice:unbound-control verbosity 3
# unbound-control verbosity 3Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
unboundservice to apply the updated configuration:systemctl restart unbound
# systemctl restart unboundCopy to Clipboard Copied! Toggle word wrap Toggle overflow Monitor real-time logs of the
unboundservice:journalctl -u unbound -f
$ journalctl -u unbound -fCopy to Clipboard Copied! Toggle word wrap Toggle overflow
29.3. Configuring client and replica systems to use DoT exclusively Link kopierenLink in die Zwischenablage kopiert!
To enforce DoT communication, you must configure clients and replica systems to use a DoT-capable resolver. You must update the DNS settings in NetworkManager to enable eDNS communication. This configuration is only required when the --dns-policy is set to enforced.
Prerequisites
- Review the steps outlined in Preparing the system for IdM client installation and Preparing the system for an IdM replica installation.
Ensure the following packages are installed:
-
ipa-server-encrypted-dns ipa-client-encrypted-dnsImportantThe
ipa-server-encrypted-dnspackage requires a newer version of thebind-utilspackage than the version installed by default on RHEL. Runsudo dnf install ipa-server ipa-server-encrypted-dns --allowerasingto allow the package manager to remove the olderbind-utilspackage and install the version required byipa-server-encrypted-dns.
-
Procedure
Copy the IdM server’s DoT certificate to the client and replica system.
scp /etc/pki/tls/certs/bind_dot.crt <username>@<ip>:/etc/pki/ca-trust/source/anchors/
$ scp /etc/pki/tls/certs/bind_dot.crt <username>@<ip>:/etc/pki/ca-trust/source/anchors/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Update the system-wide trust store configuration:
update-ca-trust extract
# update-ca-trust extractCopy to Clipboard Copied! Toggle word wrap Toggle overflow On the client and replica system, install the
dnsconfdpackage:dnf install dnsconfd
# dnf install dnsconfdCopy to Clipboard Copied! Toggle word wrap Toggle overflow Generate the default configuration files for DoT on your system:
dnsconfd config install
dnsconfd config installCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the
dnsconfdservice:systemctl enable --now dnsconfd
# systemctl enable --now dnsconfdCopy to Clipboard Copied! Toggle word wrap Toggle overflow Reload NetworkManager to apply the configuration:
nmcli g reload
# nmcli g reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the system’s DNS settings in NetworkManager.
nmcli device modify <device_name> ipv4.dns dns+tls://<idm_server_ip>
# nmcli device modify <device_name> ipv4.dns dns+tls://<idm_server_ip> Connection successfully reapplied to device '<device_name>'.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
29.4. Installing an IdM client configured to use eDNS Link kopierenLink in die Zwischenablage kopiert!
You can install an IdM client with DNS-over-TLS (DoT) enabled by performing the non-interactive installation. This setup applies the enforced DoT policy and requires the client to use eDNS queries exclusively.
Prerequisites
- Review the steps outlined in the Preparing the system for IdM client installation.
-
For
enforcedDoT, complete the steps in Configuring client and replica systems to use DoT exclusively. -
Ensure the
ipa-clientandipa-client-encrypted-dnspackages are installed.
Procedure
Install an IdM client with DoT enabled:
ipa-client-install --domain <domain_name> --dns-over-tls -p admin --password <admin_password> -U
# ipa-client-install --domain <domain_name> --dns-over-tls -p admin --password <admin_password> -UCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
On the IdM client, review cat
/etc/unbound/unbound.conf:cat /etc/unbound/unbound.conf
$ cat /etc/unbound/unbound.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the configuration contains the IP address and hostname of the IdM server.
Troubleshooting
On the IdM client, run a DNS query to trigger traffic:
dig <domain_name>
$ dig <domain_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Review the logs on the IdM server to verify that the query was routed through DoT.
29.5. Installing an IdM replica configured to use eDNS Link kopierenLink in die Zwischenablage kopiert!
You can install an IdM replica with eDNS in an environment where the IdM server has DoT enabled.
When you install the replica with the integrated DNS service, the replica uses the same configuration as the IdM server. It runs BIND to handle incoming DNS queries, including encrypted queries, and uses unbound for outgoing encrypted DNS traffic.
When you install the replica without the integrated DNS service, the replica inherits the client-side configuration. It uses unbound with a DoT forwarder to send encrypted DNS queries to the IdM DNS server.
Prerequisites
- Review the steps outlined in Preparing the system for an IdM replica installation.
-
For
enforcedDoT, complete the steps in Configuring client and replica systems to use DoT exclusively. -
Ensure the
ipa-client-encrypted-dnsandipa-server-encrypted-dnspackages are installed.
Procedure
Add the
dns-over-tlsservice to the systemfirewallto open port 853/TCP for DoT traffic:firewall-cmd --add-service=dns-over-tls
# firewall-cmd --add-service=dns-over-tlsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Depending on whether you want the replica to manage DNS records, choose one of the following:
To install an IdM replica with integrated DNS:
ipa-replica-install --setup-dns --dns-over-tls --dot-forwarder <server_ip>#<dns_server_hostname>
# ipa-replica-install --setup-dns --dns-over-tls --dot-forwarder <server_ip>#<dns_server_hostname>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To install an IdM replica without integrated DNS:
ipa-replica-install --dns-over-tls
# ipa-replica-install --dns-over-tlsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
On the IdM server, list all replicas in the topology:
ipa-replica-manage list-ruv
# ipa-replica-manage list-ruvCopy to Clipboard Copied! Toggle word wrap Toggle overflow
29.6. Configuring an existing IdM DNS server to use eDNS Link kopierenLink in die Zwischenablage kopiert!
You can enable DNS-over-TLS (DoT) on an existing Identity Management (IdM) server by reconfiguring the integrated DNS service. Use the ipa-dns-install utility with DoT-specific options to update the DNS configuration without reinstalling the server.
Prerequisites
- You have root access to the IdM server.
- DNS is already installed on the IdM server.
Procedure
Optional: Verify that your IdM server uses integrated DNS:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the
ipa-server-encrypted-dnspackage on your IdM server:dnf install ipa-server-encrypted-dns
# dnf install ipa-server-encrypted-dnsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the integrated DNS service to enable DoT and configure DoT policy and forwarders:
ipa-dns-install --dns-over-tls --dot-forwarder "<server_ip>#<dns_server_hostname>" --dns-policy enforced -U
# ipa-dns-install --dns-over-tls --dot-forwarder "<server_ip>#<dns_server_hostname>" --dns-policy enforced -UCopy to Clipboard Copied! Toggle word wrap Toggle overflow For a complete list of options see the
ipa-dns-install(1)man page on your system.Add the
dns-over-tlsservice to the systemfirewallto open port 853/TCP for DoT traffic:firewall-cmd --add-service=dns-over-tls
# firewall-cmd --add-service=dns-over-tlsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the firewall allows DoT traffic:
firewall-cmd --list-services
# firewall-cmd --list-servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow
29.7. DoT configuration options for ipa-server-install and ipa-dns-install Link kopierenLink in die Zwischenablage kopiert!
Learn about the available configuration options for enabling eDNS in your IdM deployment. You can use the same options to enable eDNS during a new IdM server installation using the ipa-server-install or to modify an existing installation using the ipa-dns-install command.
-
--dns-over-tlsenables DoT -
--dot-forwarderspecifies upstream DoT servers using the--dot-forwarder <server_ip_1><dns_server_hostname_1> --dot-forwarder <server_ip_2><dns_server_hostname_2>format -
--dns-over-tls-keyand--dns-over-tls-certto configure custom keys and certificates --dns-policysets the DNS security policy-
--dns-policy=relaxedallows both encrypted (DoT) and unencrypted DNS queries. The system attempts to use DoT but falls back to unencrypted DNS if DoT is unavailable. This is the default policy. -
--dns-policy=enforcedrequires only encrypted DNS communication. The system strictly enforces DoT, and rejects any DNS resolution that does not support encryption, including discovery from IdM clients and replicas.
-