Forum Discussion
URI restriction for for host abc.com with client IP
Hi All
I am creating a iRule to restrict a URI to a specific client IP and allow rest but I am getting a syntax error
error: [parse error: PARSE syntax 213 {syntax error in expression " ([class match -value [IP::client_addr] equals slm_...": unexpected operator /}][{ ([class match -value [IP::client_addr] equals slm_abc]) and !([HTTP::uri] equals /xyz.aspx) }]
when HTTP_REQUEST {
if {[ string tolower [HTTP::host]] equals "abc.com" } {
if { ([class match -value [IP::client_addr] equals slm_abc]) and !([HTTP::uri] equals /xyz.aspx) } {
Drop the connection
drop
} else {
Process the traffic for all IPs for URL abc.com
pool ABC_TEST_V
}
}
}
- rajeshgoud
Altostratus
Looks like I found the issue is with URI I need to use qoutes
Incorrect - !([HTTP::uri] equals /xyz.aspx) Correct !([HTTP::uri] equals "/xyz.aspx")
- Snl
Cirrostratus
Include string to lower in your IRULE, this will ensure no bypass in the URI
example - refer the last 2 irules
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