cancel
Showing results for 
Search instead for 
Did you mean: 

i-rule on an LTM for returning a DNS response based on the zone value in the query

Wasfi_182818
Nimbostratus
Nimbostratus

Hi;

 

Let's say I have an LTM and a virtual server of type DNS load balancing a pool of DNS servers. Can I have an i-rule which states that if the DNS A record query is to a record in the zone abc.net "for example" then the LTM returns a certain A record like 172.16.90.12. Does the LTM itself need to be an ADNS of the zone abc.net or a recursive resolver to be able to return such a response.

 

My aim is to have the LTM return a certain A record based on the value of the query in the DNS query without even being a recursive server itself or an ADNS for the zone containing the record.

 

If this is possible then I would like to ask you if I can have all other types of DNS record queries "MX, SRV, etc" not to be processed by this i-rule and just load balanced to the DNS pool members. Only A records are to be processed by the i-rule.

 

I only have a BIG-IP LTM here not a BIG-IP DNS "GTM"

 

Kindly Wasfi

 

2 REPLIES 2

crodriguez
F5 Employee
F5 Employee

You are quite restricted in which DNS events and commands you can use without a GTM or DNS Services add-on license. I believe the only event you can trigger an iRule on is DNS_RESPONSE. You have access to the DNS::answer and DNS::type commands, so I suppose you could parse the answer on the DNS_RESPONSE event to see if the response includes an A record in zone in abc.net. If so, you can replace DNS::answer with the answer of your choice. See https://clouddocs.f5.com/api/irules/DNS.html for more details.

 

Wasfi_182818
Nimbostratus
Nimbostratus

Thank you Cathy. There used to be a button to mark a reply as the correct answer. I don't see it anymore. I clicked the up arrow next to the zero value thinking that this achieves the same result. I hope.

 

Kindly Wasfi