Forum Discussion
Amit585731
Nimbostratus
Nov 10, 2016DNS lookup for ltm
Hi All,
Needed help on one of the issue where user has asked us to create outbound VIP for one of Akamai application. Since Akamai is CDN based so IP keeps on changing and I can't add static IP,...
Nov 12, 2016
Not sure if I understand you correctly, but maybe the irule example in the wiki for RESOLV::lookup could help you.
when CLIENT_ACCEPTED {
Get IP(s) for hostname www.example.com against 8.8.8.8 name server
set dnslookup "8.8.8.8"
set ips [RESOLV::lookup @$dnslookup -a "www.example.com"]
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 www.example.com 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]
}
}
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