Forum Discussion
Ferzat_263580
Nimbostratus
May 12, 2016Redirect hosts using iRules
Hi all,
How can I achieve the below using iRules.
if clients from [network1, network2...] querying [sub.domain.com] --answer--> 1.2.3.4;
Yann_Desmarest
Cirrus
May 12, 2016Ok, let's try this one 🙂
when DNS_REQUEST {
set ttl 1800
set A "[DNS::question name]. $ttl [DNS::question class] [DNS::question type]"
if { [string tolower [DNS::question name]] ends_with "sub.domain.com" } {
DNS::answer insert "$A 1.2.3.4"
}
DNS::return
}
Yann_Desmarest
Cirrus
May 13, 2016You have to use "class match" command to compare [IP::client_addr] with a datagroup that contains the filtered IP subnet. You can find several peace of code in devcentral
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