Forum Discussion
MH1_273408
Nimbostratus
Jul 25, 2016DNS_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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
