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

MH1_273408's avatar
MH1_273408
Icon for Nimbostratus rankNimbostratus
Jul 25, 2016

DNS_Response, insert DNSX answer iRule

Hello All, I have a pool of DNS servers running in a basic DNS virtual server. I want to write an irule that if the response from that virtual server for a reverse query is NXDOMAIN, then query the DNS Express DB and insert it's answer rather than the initial NXDOMAIN response. I think my logic is okay, I just need to figure out my DNS::scrape parameters correctly.

    when DNS_RESPONSE {
if { ([DNS::ptype] eq "NXDOMAIN") } {
    set query [DNS::scrape ANSWER qname]
    set rrsl [DNS::query dnsx $query PTR]
    foreach rrs $rrsl {
        foreach rr $rrs {
            if { [DNS::type $rr] == "PTR" } {
                DNS::additional insert $rr
            }
        }
    }
}
}
No RepliesBe the first to reply