Applies To:

Show Versions Show Versions

Manual Chapter: Resolving DNS Queries and Caching Validated Responses
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Overview: Resolving queries and caching validated responses

You can configure a validating resolver cache on the BIG-IP system to recursively query public DNS servers, validate the identity of the DNS server sending the responses, and then cache the responses. The next time the system receives a query for a response that exists in the cache, the system returns the DNSSEC-compliant response from the cache. The validating resolver cache contains messages, resource records, the nameservers the system queries to resolve DNS queries, and DNSSEC keys.

Using the validating resolver cache, the BIG-IP system mitigates cache poisoning by validating DNS responses using DNSSEC validation. This is important, because attackers can attempt to populate a DNS cache with erroneous data that redirects clients to fake web sites, or downloads malware and viruses to client computers. When an authoritative server signs a DNS response, the validating resolver verifies the data before entering the data into the cache. Additionally, the validating resolver cache includes a built-in filter and detection mechanism that rejects unsolicited DNS responses.

BIG-IP system using validating resolver cache Illustration of BIG-IP system using validating resolver cache

Task summary

Perform these tasks to configure a validating resolver cache on the BIG-IP system.

Creating a validating resolver DNS cache

Create a validating resolver cache on the BIG-IP system when you want the system to resolve DNS queries, use DNSSEC to validate the responses, and cache the responses.
  1. On the Main tab, click Local Traffic > DNS Caches > DNS Cache List. The DNS Cache List screen opens.
  2. Click Create. The New DNS Cache screen opens.
  3. In the Name field, type a name for the cache.
  4. From the Resolver Type list, select Validating Resolver.
  5. Click Finished.
Associate the DNS cache with a custom DNS profile.

Creating a trust anchor for a validating resolver DNS cache

You must create a trust anchor for a validating resolver to be able to validate content in a DNS response.
  1. From a client, run the command dig @ldns_ipaddress <zone> DNSKEY, and then copy the 257 record type key. This is an example of a 257 record type key. . 500 IN DNSKEY 257 3 5 AwEAAds8tHDE1wQgDjJ8/fE7aunu9Kc5bNcGcsKvVc3D1Y4mRIBnLm4q f42b5eu2aPZB/SEYD76qOhYLNnvnRel510Rx0yF77qy3vWfgBImzRxy4 JUVlewG0k4zKpiOo8ZFFLX7kGvLF1o2LUa3B2OjPZBo3KPdlwr8xVzU0 ypJfIE/9kuAq81EplXRshn5i7owU8hhEMmEfa+e/9vnsdNckUe+7gHYr ToDftWxS+XkRkC6Q8Yfp/25hsTi1ZbSytoXc1+syDwh1pykxvYq+526R 3m8Yy74Hd987/IXRjuRi6X4WWq282Cm2FQRsgNCTLPwwjZ0nDB6dhfUp DsawoAw8f4k=
  2. Log on to the command-line interface of the BIG-IP system.
  3. At the BASH prompt, type tmsh, and press Enter.
  4. At the tmsh prompt, type ltm dns cache validating-resolver, and press Enter.
  5. Type modify <validating-resolver name> trust-anchors add { " <paste the contents of the 257 record type key that you copied here> " }, and press Enter. For example, modify my_validating_resolver trust-anchors add { " . 500 IN DNSKEY 257 3 5 AwEAAds8tHDE1wQgDjJ8/fE7aunu9Kc5bNcGcsKvVc3D1Y4mRIBnLm4q f42b5eu2aPZB/SEYD76qOhYLNnvnRel510Rx0yF77qy3vWfgBImzRxy4 JUVlewG0k4zKpiOo8ZFFLX7kGvLF1o2LUa3B2OjPZBo3KPdlwr8xVzU0 ypJfIE/9kuAq81EplXRshn5i7owU8hhEMmEfa+e/9vnsdNckUe+7gHYr ToDftWxS+XkRkC6Q8Yfp/25hsTi1ZbSytoXc1+syDwh1pykxvYq+526R 3m8Yy74Hd987/IXRjuRi6X4WWq282Cm2FQRsgNCTLPwwjZ0nDB6dhfUp DsawoAw8f4k }

Creating a custom DNS profile for validating resolver DNS caching

Ensure that at least one DNS cache exists on the BIG-IP system.
You can create a custom DNS profile to configure the BIG-IP system to cache responses to DNS connection requests.
  1. On the Main tab, click Local Traffic > Profiles > Services > DNS. The DNS profile list screen opens.
  2. Click Create. The New DNS Profile screen opens.
  3. In the Name field, type a name for the profile.
  4. In the Parent Profile list, accept the default dns profile.
  5. Select the Custom check box. The fields in the Settings area become available for revision.
  6. From the Use BIND Server on BIG-IP list, select Disabled.
  7. From the DNS Cache list, select Enabled. When you enable the DNS Cache option, you must also select a DNS cache from the DNS Cache Name list.
  8. From the DNS Cache Name list, select the DNS cache that you want to associate with this profile. You can associate a DNS cache with a profile, even when the DNS Cache option, is Disabled. This allows you to enable and disable the cache for debugging purposes.
  9. Click Finished.
Assign the custom DNS profile to the virtual server that handles the DNS traffic that includes the responses to queries that you want to cache.

Assigning a custom DNS profile to a GTM listener

Ensure that at least one custom DNS profile that is configured for DNS caching exists on the BIG-IP system.
You can assign a custom DNS profile to a listener to enable the BIG-IP system to perform DNS caching on the traffic the listener handles.
Note: This task applies only to GTM-provisioned systems.
  1. On the Main tab, click Global Traffic > Listeners. The Listeners List screen opens.
  2. Click the name of the listener you want to modify.
  3. From the DNS Profile list, select the custom DNS profile you created for DNS caching.
  4. Click Finished.

Determining DNS cache performance

You can view statistics to determine how well a DNS cache on the BIG-IP system is performing.
  1. On the Main tab, click Statistics > Module Statistics > Local Traffic. The Local Traffic Statistics screen opens.
  2. From the Statistics Type list, select DNS Cache.
  3. In the Details column for a cache, click View, to display detailed information about the cache.
  4. To return to the Local Traffic Statistics screen, click Back.

Viewing records in a DNS cache

You can view records in a DNS cache to determine how well a specific cache on the BIG-IP system is performing.
  1. Log in to the command-line interface of the BIG-IP system.
  2. At the BASH prompt, type tmsh.
  3. At the tmsh prompt, type show ltm dns cache <cache type> <cache name>, and press Enter. For example, the command sequence show ltm dns cache transparent my_transparent_cache, displays the messages and resource records in the transparent cache named my_transparent_cache.

Viewing DNS cache statistics using tmsh

You can view DNS cache statistics using tmsh to determine how well a specific cache on the BIG-IP system is performing.
  1. Log in to the command-line interface of the BIG-IP system.
  2. At the BASH prompt, type tmsh.
  3. At the tmsh prompt, type show ltm dns cache, and press Enter. Statistics for all of the DNS caches on the BIG-IP system display.
  4. At the tmsh prompt, type show ltm dns cache <cache-type>, and press Enter. For example, the command sequence show ltm dns cache transparent, displays statistics for each of the transparent caches on the system.
  5. At the tmsh prompt, type show ltm dns cache <cache type> <cache name>, and press Enter. For example, the command sequence, show ltm dns cache transparent my_t1, displays statistics for the transparent cache on the system named my_t1.

Managing cache size

Determine the amount of memory the BIG-IP system has and how much you want to commit to DNS caching. View the statistics for a cache to determine how well the cache is working.
You can change the size of a DNS cache to fix cache performance issues.
  1. On the Main tab, click Local Traffic > DNS Caches > DNS Cache List. The DNS Cache List screen opens.
  2. Click the name of the cache you want to modify.
  3. In the Message Cache Size field, type the maximum size in bytes for the DNS message cache. The BIG-IP system caches the messages in a DNS response in the message cache. A higher maximum size makes if possible for more DNS responses to be cached and increases the cache hit percentage. A lower maximum size forces earlier eviction of cached content, but can lower the cache hit percentage.
    Important: The message cache size includes all tmms on the BIG-IP system; therefore, if there are eight tmms, multiply the size by eight and put that value in this field.
  4. In the Resource Record Cache Size field, type the maximum size in bytes for the DNS resource record cache. The BIG-IP system caches the supporting records in a DNS response in the Resource Record cache. A higher maximum size makes if possible for more DNS responses to be cached and increases the cache hit percentage. A lower maximum size forces earlier eviction of cached content, but can lower the cache hit percentage.
    Important: The resource record cache size includes all tmms on the BIG-IP system; therefore, if there are eight tmms, multiply the size by eight and put that value in this field.
  5. In the Nameserver Cache Count field, type the maximum number of DNS nameservers for which the BIG-IP system caches connection and capability data.
    Important: The nameserver cache count includes all tmms on the BIG-IP system; therefore, if there are eight tmms, multiply the count by eight and put that value in this field.
  6. In the Unsolicited Reply Threshold field, change the default value if you are using the BIG-IP system to monitor for unsolicited replies using SNMP. The system always rejects unsolicited replies. The default value of 0 (off) indicates the system does not generate SNMP traps or log messages when rejecting unsolicited replies. Changing the default value alerts you to a potential security attack, such as cache poisoning or DOS. For example, if you specify 1,000,000 unsolicited replies, each time the system receives 1,000,000 unsolicited replies, it generates an SNMP trap and log message.
  7. Click Finished.

Clearing a DNS cache

You can clear all records from a specific DNS cache on the BIG-IP system.
  1. On the Main tab, click Local Traffic > DNS Caches > DNS Cache List. The DNS Cache List screen opens.
  2. Click the Statistics tab. The Local Traffic Statistics screen opens.
  3. Select the check box next to the cache you want to clear, and then click Clear Cache.

Clearing specific records from a DNS cache

You can clear specific records from a DNS cache using tmsh. For example, you can delete all RRSET records or only the A records in the specified cache.
Tip: In tmsh, you can use the command completion feature to discover the types of records that are available for deletion.
  1. Log in to the command-line interface of the BIG-IP system.
  2. At the BASH prompt, type tmsh.
  3. At the tmsh prompt, type ltm dns cache records, and press Enter to navigate to the dns cache records module.
  4. Type delete <cache-type> type <record-type> cache <cache-name>, and press Enter. For example, the command sequence delete rrset type a cache my_resolver_cache, deletes the A records from the resource record cache of the resolver cache named my_resolver_cache.

Implementation result

You now have an implementation in which the BIG-IP system acts as a DNS resolver, verifies the validity of the responses, caches DNSSEC-compliant responses, and answers queries for a cached response with a DNSSEC-compliant response from the cache.

Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)