Forum Discussion
F5 ASM - locally defined geolocation
We are currently using a rule to redirect to sites local in EU and need to exempt items from geolocation processing. This only works for items you are processing in a Irule but might help
when HTTP_REQUEST {
ranges
if [IP::addr [IP::client_addr]/30 equals 212.146.95.34] {return}
Whitlisted address
if { [IP::client_addr] equals "212.18.1.146" } {return}
set country [whereis [IP::client_addr] country] switch $country { "AL" - "BY" - "BA" - "BG" - "CZ" - "GB" - "GE" - "GR" - "HR" - "HU" - "IE" - "MD" - "ME" - "RO" - "RS" - "SK" - "TR" - "UA" { HTTP::respond 301 Location "(https://someplace.eu); event HTTP_REQUEST disable } }
I think you could add functionality to force a selection with something like this but I haven't tested it.
if { [IP::client_addr] == "Your.IP.Address"} { set [whereis [IP::client_addr]] "FR" }
or perhaps use a set country "FR" of course you could use other geo subdivisions as well
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