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 19, 2016

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 } } } } }

 

No RepliesBe the first to reply