Forum Discussion

NiranjanKC_3656's avatar
NiranjanKC_3656
Icon for Nimbostratus rankNimbostratus
Jun 29, 2018

F5 rule for TLS redirect

Hi i am beginner trying to get a F5 rule to work. So any request that comes in with less than TLS 1.2 should redirect to a default page. Now i need to create a exception to this? Except for one URL send all other < TLS1.2 to the default page. Here are my rules

 

when CLIENTSSL_HANDSHAKE { if { [SSL::cipher version] equals "TLSv1.2" } then { set deny_reason "" } else { set deny_reason [URI::encode [b64encode "Denied SSL Handshake for Client [IP::client_addr]:[TCP::client_port] using [SSL::cipher version], [SSL::cipher name] and [SSL::cipher bits]"]] } }

 

when HTTP_REQUEST { if { ($deny_reason ne "") and not ([HTTP::uri] starts_with "/myvalue")} then { HTTP::respond 302 Location "MyURL?reason=$deny_reason" Cache-Control No-Cache Pragma No-Cache Connection Close } }

 

This rule breaks every thing and the website does'nt work. Appreciate any help.