Forum Discussion
Mike_59458
Oct 25, 2011Nimbostratus
Rule not working as expected
I have installed this rule on a virtual server for a Exchange 2010 Client Access Server. I am trying to block access to OWA on this VS. Code is below:
(code)
when HTTP_REQUEST {
...
nitass
Oct 25, 2011Employee
I was hoping that the HTTP::respond 401 would send a 401 error screen if the /owa URI was at the end of the URL.should we use ends_with instead of eq?
e.g.
[root@iris:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.17.33:http
ip protocol tcp
rules myrule
profiles {
http {}
tcp {}
}
}
[root@iris:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] ends_with "/owa"} {
HTTP::respond 401
}
}
}
[root@iris:Active] config curl -i http://172.28.17.33/test/owa
HTTP/1.0 401 Unauthorized
WWW-Authenticate: Basic realm=""
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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