Forum Discussion
Redirect dns resolution based source ip
Hi Team,
I need help
I need to iRules for redirect dns resolution based source ip/subnet for which weighted ratio LB method configured under pool for WIDE IP
Sample: rule:
when DNS_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } {
use pool GTM_pool1
} else {
cname www.redirect.domain.com
}
}
In above example, instead of pointing to pool(GTM Pool1), want to point to Destination IP.
Thanks in advance
3 Replies
Hi grisihb,
Can you try this?
when DNS_REQUEST { if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } { host 10.11.12.13 } else { cname www.redirect.domain.com } }- girishb
Cirrus
Thank eaa for sharing the irule code..
Here is my question.. in code, client_addr is requester (source) ip address or its LDNS IP ?
I think, client_addr is the LDNS IP.
Ref: https://devcentral.f5.com/s/articles/gtm-return-ldns-ip-to-client
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
