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 {
HTTP::enable
if {[string tolower [HTTP::uri]] eq "/owa" } {
HTTP::respond 401
}
}
(end code)
I get to the login screen but it will not let me log in. 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. Am I missing something?
Mike
- nitassEmployeeI 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?
[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
- Michael_YatesNimbostratusMost instances of OWA that I have seen use it has http://owa.domain.com/owa
- Bayan_El_Ameen1NimbostratusAdd that you can drop the connection totally by using the "drop" keyword instead of using "HTTP::respond 401"
- Michael_YatesNimbostratusHi Bayan,
- Bayan_El_Ameen1NimbostratusThank you Michael for your note
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