Forum Discussion
SK_121993
Nimbostratus
Oct 25, 2013Geolocation irule with HTTP response
I am trying to modify the following irule that is set to block connections from Germany, to display a message to the end user that thier connection is blocked. I added 'when http_request' command at ...
Richard__Harlan
Oct 25, 2013Historic F5 Account
You can try something like this
when HTTP_REQUEST {
set default_pool [LB::server pool] switch [whereis [IP::client_addr] country]{
DE {
log local0. "Geo Client ([IP::client_addr]) detected as Germany"
HTTP::respond 500 content {
Apology Page
We are sorry, but you are not allowed access to this site from you geographic location
}
}
default { pool $default_pool }
}
}
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