Forum Discussion
mbamusa_59409
Oct 16, 2012Nimbostratus
Geolocation Irule
Hi All ;
i have the following irule :
when CLIENT_ACCEPTED {
if {[ whereis [IP::client_addr] country] eq US ] or [IP::addr [IP::client_addr] equals 10.7.10.1]}
...
Arie
Sep 02, 2015Altostratus
If the only condition you're checking for is "India" it would be better to not use a data class due to the overhead.
when CLIENT_ACCEPTED {
set allowed 0
if { [whereis [IP::client_addr] country] eq "IN" } {
set allowed 1
}
}
when HTTP_REQUEST {
if { $allowed == 0 } {
HTTP::respond 403 content "Blocked!"
}
}
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