Forum Discussion
HELP CREATING IRULE FOR ACCORDING SSL VERSION RESPONSE WITH HTML PAGE
Hello,
I am trying to create / homologate a rule from a citrix balancer(netscaler) to a F5 because of a brand migration, however I have not been able to find the configuration for the rule which I will detail below:
EXPRESSION:
(CLIENT.SSL.VERSION.EQ(0x301)||CLIENT.SSL.VERSION.EQ(0x302))&&(CLIENT.IP.SRC.EQ(x.x.x.x)||CLIENT.IP.SRC.EQ(y.y.y.y)||CLIENT.IP.SRC.EQ(x.x.y.y)||CLIENT.IP.SRC.EQ(y.y.x.x)||CLIENT.IP.SRC.EQ(x.y.x.y)).NOT
ACTION:
TYPE: Respond with HTML PAGE (response status code :200)
HTML PAGE:
Edited by Leslie_Hubertus to remove actual links.
It is definitely possible on the F5. I would start by saving the HTML you want to serve up as an iFile. Then, on the Virtual Server, you will need to make sure you have an SSL Client profile, and of course HTTP profile applied. Once you have that in place, we can setup the iRule with the logic you are looking for.
Take a look here for starters:
Here is what else I found:
The SSL/TLS version will be written as hex. 0x303 is TLS 1.2, 0x302 is TLS 1.1, 0x301 is TLS 1.0, 0x300 is SSL 3.0
So essentially, you are blocking TLS 1.0 and TLS 1.1 for all source IPs except for a small specific set (maybe internal testers? important executive people not wanting to upgrade their laptop? idk).
So, you will need to capture the encryption type via the following:
when CLIENTSSL_CLIENTHELLO { set ssl_version [SSL::cipher version] } when HTTP_REQUEST { if { (not ([IP::addr [IP::client_addr] equals 10.10.10.10] or [IP::addr [IP::client_addr] equals 10.10.10.20] or [IP::addr [IP::client_addr] equals 10.10.10.30])) and ($ssl_version equals "TLSv1" or $ssl_version equals equals "TLSv1.1") } { HTTP::respond 200 content [ifile get web_page] "Content-Type" "text/html;charset=utf-8" } }
Thanks for the double-dip on the answer whisperer.
JBLACKBERRY_888 - if these answers were helpful please select *Accept As Solution* and thanks for being part of our community.
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