For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

rolf's avatar
rolf
Icon for Cirrus rankCirrus
Nov 06, 2019

how to send NXDOMAIN with BigIP DNS

Hi friends,

 

I have a question. A customer would like to manipulate some DNS responses using F5 DNS having the following use cases:

  1. Change the DNS Response IP (to a public IP)
  2. Change the DNS Response to NXDOMAIN (for IP addresses which should not be published)

 

I thought about the following iRule to create the 1st use case:

when DNS_REQUEST {

    if { [DNS::question name] equals "fqdn.of.customer" }{

      DNS::answer insert "[DNS::question name]. 3600 [DNS::question class] [DNS::question type] 1.2.3.4"

      DNS::return

    }

}

 

Any idea what I have to use to return a NXDOMAIN?

DNS::answer insert "???"

 

Do you see a simpler approach? (mid Term we will implement different DNS views).

 

Thanks,

Rolf

1 Reply

  • After searching a while i found the correct iRule statements:

     

    DNS::answer clear

    DNS::header rcode NXDOMAIN

    DNS::return