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]}
{
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 "Not Allowed"}
}
but after applying it it seems that it accept the second portion (IP::client_addr] eq 1.1.1.34) and not Accept the first one (Country) .
could you please help me on this and also itf there is a way to create a data group for countries ?
Thank you