Forum Discussion
allow one url from blocks geolocation
- Nov 02, 2023
Also make sure that the Trigger ASM iRule Events setting is enabled in your security policy. See: Solved: Where in F5 ASM do I enable the Trigger ASM iRule ... - DevCentral
It also helps to add more logging to your iRule, so you can see if the event is hit at all.
It seems your first if statement is wrong, because it lowers all strings in [HTTP::uri] and then it is compared to a string which includes uppercase characters. So there will never be a match. Second, the '[whereis ip country]" command returns a string containing the two-letter country code. So it will not match 'Sweden'. And the ASM::unblock command can't be used in the HTTP_REQUEST event.
See:
So, your iRule should be more like:
when ASM_REQUEST_DONE {
if { ([string tolower [HTTP::uri]] eq [string tolower "/Arabic/MediaCenter/News/Pages/Infectious-Disease-Week.aspx"]) and ([whereis [IP::client_addr] country] ne "SE") } {
ASM::unblock
log local0. "[ASM::violation_data]. Unblocked for [IP::client_addr]"
} else {
return
}
}
thanks for the reply but I tried it and asm still blocks the request. any advise for different irule
- Nov 02, 2023
Also make sure that the Trigger ASM iRule Events setting is enabled in your security policy. See: Solved: Where in F5 ASM do I enable the Trigger ASM iRule ... - DevCentral
It also helps to add more logging to your iRule, so you can see if the event is hit at all.
Recent Discussions
Related Content
* 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