Forum Discussion
Samir
Dec 03, 2020MVP
Try below iRule. Hope it will work for you.. thanks
when HTTP_REQUEST {
set fromCountry [whereis [IP::client_addr] country]
if { ([class match $fromCountry equals example_datagroup]) && ([HTTP::uri]] starts_with "/abc") } {
log local0. "Attacker IP in XFF [HTTP::header X-Forwarded-For]" ;# This can be removed/commented out if not required
HTTP::respond 403 content "Blocked!" ;# This can also be changed to drop or reject based on the requirement
}
}