Forum Discussion
Capture client DNS request for additional DNSX answer irule
All, I'm looking for a way to use an irule to capture the query sent by a client so that I can insert an additional DNSX response to the client if the response to a PTR query is ptype NXDOMAIN.
As a bit of background, I have an environment where two untrusted active directory forests own and operate in the same subnet and all clients need to be able to perform reverse lookups in both forests, all in the same subnet. What I'm thinking I'll do is have DNS pools setup for the "primary" forest as a virtual server and if a response is returned NXDOMAIN then have the F5 query the DNSX which holds the reverse zone for the other forest and insert it as an answer.
I'm looking to do something like this.
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 } } } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
