Forum Discussion

Sriram_87174's avatar
Sriram_87174
Icon for Nimbostratus rankNimbostratus
May 03, 2019

DNS irule for resolving FQDN with a IP - LTM

Hi All,

 

I have a request from the project to explore the option for the scenario below. VIP to be setup to listen on UDP 53 traffic The client sends a request with FQDN (there are 6 x FQDN names) Need to map the FQDN with a private IP and send the response. Client will then initiate a request to the IP provided

 

Is there a way we can resolve the FQDN request on a irule and which VIP type to use?

 

Note: i tried to convince to upgrade to BIG-IP DNS (GTM) module which was knocked back at this stage, so if the answer is still BIG-IP DNS (GTM) module then i will push for it.

 

Thanks for your help in advance.

 

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    What was the reason given when the request for an upgrade was knocked back?

     

  • Hi.

    If you want to use DNS in irule unsing LTM you must have necessary license (DNS Services license)

    try this:

    when DNS_REQUEST {
    
    set host [DNS::question name]
    
      switch -glob $host {
        "hostname1.domain.com" { 
            DNS::answer insert "[DNS::question name]. 300 [DNS::question class] [DNS::question type] 1.1.1.1"
            DNS::return
        }
        "hostname2.domain.com" { 
            DNS::answer insert "[DNS::question name]. 300 [DNS::question class] [DNS::question type] 1.1.1.2"
            DNS::return
        }
        default {
            do nothing
        }
      }
    }
    

    let me know if you need more details.

    regards,