Forum Discussion
Jim_Araujo_1061
Nimbostratus
Oct 28, 2014GTM iRule to modify Query?
Hey folks, is it possible for an iRule to change the DNS name being queried? For example, based on the condition in the article here https://devcentral.f5.com/questions/gtm-irule-to-provide-cname-bas...
Jim_01_137564
Nimbostratus
Feb 06, 2015This is what I came up with, and please feel free to improve and post back as my TCL skills are a bit rusty.
when DNS_REQUEST {
set wip ".wip."
set in_query [DNS::question name]
set suffix_query [string trim [domain $in_query 2] " "]
set lead_domain [string trim [lindex [split $in_query "." ] 0] " "]
set out_query "$lead_domain$wip$suffix_query"
log local0. "$out_query"
cname $out_query
}
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