Forum Discussion
gdoyle
Cirrostratus
May 19, 2016Custom Response Upon Denial with iRule.
We created an irule which denies a user access if they are not using TLS 1.1 or greater (so TLS1.0 or no TLS). We would like a custom message, and although it is in the iRule, that is not the message...
Yann_Desmarest_
Nacreous
May 19, 2016Hello,
The irule below allow you to generate a custom message when the connection use a weak protocol :
when HTTP_REQUEST {
switch -glob [SSL::cipher version] {
"TLSv1.1" -
"TLSv1.2" {
Do nothing and allow the request
}
default {
HTTP::respond 200 content \
"<html><head><title>Maintenance page</title></head><body>
<p align=center> **********CUSTOM DENIAL MESSAGE HERE.**********
</p></body></html>" "Content-type" "text/html"
return
}
}
}
Tested on my lab with success. Just few commands on the bigip that can help you test :
openssl s_client -connect 172.20.2.7:443 -tls1_1
openssl s_client -connect 172.20.2.7:443 -tls1_2
openssl s_client -connect 172.20.2.7:443 -tls1
openssl s_client -connect 172.20.2.7:443 -ssl3
when the ssl connection is established, you can type "GET /" and enter
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