Forum Discussion

WithF5's avatar
WithF5
Icon for Nimbostratus rankNimbostratus
Sep 20, 2017

Answer DNS query

Hello guys,

 

I am trying to make an iRule where when I receive any FQDN in the listener on GTM, it responds with just one IP address. Can anyone give me a tip how to do it? I am trying to use DNS::answer and DNS::return but no success.

 

Thanks.

 

2 Replies

  • WithF5's avatar
    WithF5
    Icon for Nimbostratus rankNimbostratus

    Found out the answer! 😃

    when DNS_REQUEST {
        DNS::answer insert "[DNS::question name]. 111 [DNS::question class] [DNS::question type] 1.1.1.1"
        DNS::return
    }
    

    Cheers

  • This can be solved without an iRule. Do you always want to respond with just that address (i.e., 1.1.1.1 in your example)? If so, use the GTM Pool LB method "Fallback IP", and set it to 1.1.1.1.