Forum Discussion
kridsana
Sep 04, 2018Cirrocumulus
iRule to resolve DNS for GTM (wide-ip if possible)
Hi
I've server on cloud and want to try to use irule to resolve dynamic IP from cloud and return IP to user.
I saw irule LTM can use RESOLVE:lookup and we can use it on Listener.
But I...
kridsana
Sep 05, 2018Cirrocumulus
FYI
This is irule that can include on Listener. (But not wide ip)
The irule resolve dynamic IP from AWS and return to user.
Cloud server is ABC.ap-southeast-1.elb.amazonaws.com
when DNS_REQUEST {
if {([string tolower [DNS::question name]] equals "ABC.com") && ([DNS::question type] equals "A")} {
set aws [RESOLV::lookup @8.8.8.8 -a "ABC.ap-southeast-1.elb.amazonaws.com"]
DNS::answer insert "[DNS::question name]. 111 [DNS::question class] [DNS::question type] [lindex $aws 0]"
DNS::return
}
}
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