Forum Discussion
Neil_66348
Nov 09, 2010Nimbostratus
iRule GeoIP Targeting
Hi Guys ,
We're looking to implement some targeting thats found in 10.2 on our F5's.
Performing matching at the IP level works fine , I've found some example code for matching to t...
Neil_66348
Nov 09, 2010Nimbostratus
Hi ,
That compiles , which is a great.
Using an iRule to dump out to a local0, determined I need to use "state" to determine eg "Greater London" / "York" etc. This successfully posts eg ,
when CLIENT_ACCEPTED { log local0. "Got client: [whereis [IP::client_addr] country continent state isp]" }
Rule GeoIPLog : Got client: GB EU York {verizon business}
Rule GeoIPLog : Got client: GB EU {Greater London} {btnet uk regional network}
The iRule posts no errors , however nor is matching the pickup of the "state" to redirect to the correct redirect...
when HTTP_REQUEST {
set state [class match -value [whereis [IP::client_addr] abbrev] equals uk_regions]
if {$state ne ""}{
switch $state {
"Greater London" {HTTP::redirect }
"Leeds" {HTTP::redirect }
"York" {HTTP::redirect }
default {pool TIN-HTTP-POOL}
}
}
}
Any ideas why its not picking up to redirect the client to the applicable address....
Thanks
Neil
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