Forum Discussion
CGI
Altostratus
Nov 16, 2010Combining geofiltering and uri filter
Hi we have a irule today that is below;this rule was created with help from this forum, i now need to be able to send traffic that reequests a certain url
IRULE:-
when CLIENT_ACCEPTED {
if {([class match [whereis [IP::client_addr] country] eq allowed_country] or [class match [IP::client_addr] eq allowed_ip])} {
set allowed 1 }
else { set allowed 0 }}
when HTTP_REQUEST {
if { $allowed eq 1 } {
Uncomment the line below to turn on logging.
log local0. "Valid client IP: [IP::client_addr]"
}
else {
HTTP::respond 403 content "The country or IP is not allowed to access this site"
log local0. "Blocked Country client IP: [IP::client_addr] from [whereis [IP::client_addr] country]" } }
such as http://at.nowhere.com/corp and comes from the UK to a different pool than those from Ireland.
Whats the best way to do this as regards both perofrmance and optimisation.
Any help greatly appreciated.
/Regards Craigg
- hoolio
Cirrostratus
Hi Craigg,
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