Forum Discussion
Brent_J
Nimbostratus
Nov 17, 2015Query GTM supplying Client IP address from LTM
Hi, I have an problem with GTM wideIP geolocation.
Problem statement: I need to send clients to specific VIPs in Geo distinct datacenters based on the client IP.
In my country all ISP ...
Andy_McGrath
Cumulonimbus
Nov 17, 2015Option 2 is not an option, standard DNS function means requests will always come from a Recursive DNS server and never directly from the client.
Option 1 would need an iRule to use the 'whereis' iRule feature see the following example:
when HTTP_REQUEST {
switch [string tolower [whereis [IP::client_addr] abbrev] {
"af" -
"bh" -
"bd" -
"be" -
"eg" -
"fr" -
"de" -
"in" -
"ir" -
"iq" -
"it" -
"jo" -
"kz" -
"ke" -
"kw" -
"lb" -
"mo" -
"np" -
"nl" -
"om" -
"pk" -
"qa" -
"ru" -
"sa" -
"es" -
"lk" -
"sd" -
"sz" -
"sy" -
"tn" -
"tr" -
"ua" -
"ae" -
"ye" {
HTTP::redirect "http://www.example.com/home-${country}"
}
default {
Redirect all others
HTTP::redirect "http://www.example.com/home"
}
}
}
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