Forum Discussion
ahmed_ismail_21
Nimbostratus
Jun 05, 2016why F5 give me this error
looking for close parenthesis}][{($allowed == 0) and ([HTTP::uri] end_with "/register")}]
when CLIENT_ACCEPTED {
set allowed 0
if { [ class match -- [whereis [IP::client_addr] country]...
Yann_Desmarest
Cirrus
Jun 05, 2016Hi,
You are using end_with but the correct syntax is ends_with :
when CLIENT_ACCEPTED {
set allowed 0
if { [class match -- [whereis [IP::client_addr] country] equals "EG"] or [[whereis [IP::client_addr] country ] not equals "EG"] } {
set allowed 1
}
}
when HTTP_REQUEST {
if { ($allowed == 0) and ([HTTP::uri] ends_with "/register") } {
HTTP::respond 403 content "Blocked!"
}
}
ahmed_ismail_21
Nimbostratus
Jun 06, 2016Hi Yann,
when I applied this iRule to virtual server, the below error message appear to me.
Unable to find value_list (EG) referenced at line 3: [class match -- [whereis [IP::client_addr] country] eq "EG"]
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