Forum Discussion
marv_Williams_5
Nimbostratus
Apr 20, 2015Geolocation I-Rule not parsing properly
I am trying to create an I-Rule using geolocation blocking. I am blocking everything but US traffic and also allowing certain IP addresses via a data group called whitelist. The rule is not parsing...
marv_Williams_5
Nimbostratus
Apr 20, 2015That rule blocks "US" traffic. Here is what I have been trying unsuccessfully to do:
Allow US traffic Block everything else Allow for a whitelist of specific IP addresses that I can let through
Here is the I-Rule I have been altering to try to accomplish this:
when CLIENT_ACCEPTED { set allowed 0 log local0. "Location = [whereis [IP::client_addr] continent]"
if {{[class match--[ whereis[IP::client_addr]continent] eq Blocked_Continents ] && not [IP::addr][IP::client_addr] equals 70.197.19.197 ]}} { set allowed 1 } } when HTTP_REQUEST { if { $allowed == 1} { log local0. "Blocked Traffic from [IP::client_addr] Redirected"
HTTP::redirect "https://www.blackhawknetwork.com"} }
I keep getting boolean tcl errors with the above I-rule
Thanks for your help
- kunjanApr 20, 2015
Nimbostratus
If you check the expression, I've negated the condition. So it will redirect if the country doesn't match US or whitelist datagroup(created)
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