Use DNS server list for DNS resolution through F5 LTM irule
We already use DNS resolution using one specific DNS server in RESOLV::lookup. I am trying to figure out a solution where i can use a list of DNS servers and not finding any resources for it.
Can someone help me with it?
Following is a sample i got off devcentral:
Select the first returned IP address as the destination IP (inherits the destination port from the client's destination port).
when RULE_INIT { set static::dns_vs my_dns_vs } when CLIENT_ACCEPTED { Get IP(s) for hostname against 4.2.2.1 name server set ips [RESOLV::lookup @$static::dns_vs -a ";] Log result. If there are multiple IP's it could be a TCL list like {1.1.1.1 2.2.2.2 3.3.3.3}. log local0. "Looked up and found $ips, parsed first element: [lindex $ips 0]" Check if the first list element was empty if {$ips eq ""}{ Input wasn't an IP address, take some default action? } else { Select the IP node [lindex $ips 0] } }