Forum Discussion

mithuuu85's avatar
mithuuu85
Icon for Nimbostratus rankNimbostratus
Jul 19, 2022

Gtm to forward selective traffic to another dns server

Hi,  

 

I have a gtm and my requirement is to have gtm should forward specific queries to different dns server , kindly help  and support

4 Replies

  • You are not providing a lot of info so that this open tech community can help you to find the best solution 🙂

     

    What I can say is if you add a pool to the DNS listener then anything that does not match the F5 GSLB or Express Zone will go that pool:

    https://support.f5.com/csp/article/K63042196

    https://support.f5.com/csp/article/K14510

    https://community.f5.com/t5/technical-articles/lightboard-lessons-f5-dns-order-of-operations/ta-p/288562

     

     

    Outside of that you can attach an irule to the listener and send the traffic to a specific pool or done depending on what works for you:

     

    https://clouddocs.f5.com/api/irules/DNS_REQUEST.html

     

    • mithuuu85's avatar
      mithuuu85
      Icon for Nimbostratus rankNimbostratus

      HI Nikoolay,

      Thanks for your reply. 

      My requirement is all the servers are configured to resolve FQDN name from the GTM in our enviornment and there is one site i need when the server sent the request to GTM for that URL it should forward to another GTM server (different location not handling by us)  , So for doing the conditional forward in my GTM what is the configuration need to apply , Kindly advice.

      Thanks and Regards,

      Midhun P.K 

      • Nikoolayy1's avatar
        Nikoolayy1
        Icon for MVP rankMVP

        By URL you mean FQDN domain name right ? It is not an issue to capture the DNS request with an irule attached to the DNS listener and resolve it to the Virtual server listener on the other device as I gave you the link for the DNS request event.

         

        https://clouddocs.f5.com/api/irules/DNS_REQUEST.html

        https://clouddocs.f5.com/api/irules/DNS__question.html

         

        Example:

         

        when DNS_REQUEST {
        if { [DNS::question name] equals "the domain you want to redirect" } {
        host 10.20.20.20
        }
        }

         

        You can add type with the "DNS::question" command in the "if" statement to also select to send maybe just A records to the other GTM device etc.

         

         

        But maybe from what I read you want the F5 DNS to delegate the DNS resolution to another F5 then read the article below how to do this on the F5 bind but the traffic is captured by a wide ip that matches a more general domain then you can try again with an irule to send the traffic to a DNS listener pool that has your DNS server and attach the iRule to the Listener object.

         

        https://support.f5.com/csp/article/K34150459

         

         

        when DNS_REQUEST {
        if { [DNS::question name] equals "the domain you want to redirect" } {
        pool <your DNS/LTM pool with the other GTM listener IP address>
        }
        }

  • If you managed to get the needed answers, please flag the question as answered.