Forum Discussion

Mike_Mergens_61's avatar
Mike_Mergens_61
Icon for Nimbostratus rankNimbostratus
Aug 15, 2013

Multipule HTTPS redirect to single HTTP URL

We are installing a Server to present Maintenence pages for several different web sites. The sServer is using host headers and that appears to be working when a user connects to a Down VIP. The issue I'm having is when conencting Via HTTPS the client will get a Certificate warning because the SSL profile does not match all of the potential URL's .

 

I would like to create an I rule that would use a Datalist to map the correct url for the initial requested VIP than redirect them to the single server using host headers to present the appropriate Site's maintenence or Site Down page. Any Suggestions? Seem most of the conversation is for HTTP - HTTPS redirects.

 

Appreciate any direction on this.

 

Mike

 

5 Replies

  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account

    You could also create a iRule and attach it to each VIP. If all the members in the pool are down or if all the pool members return a 5xx error then it would return the maintenance page to the user. There would still be only one iRule to maintain and you would not have to worry about redirecting any requests.

     

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    Just keep in mind that SNI is not compatible with any version of IE on Windows XP.

     

  • Using TLS Server Name Indication is one way of handling this however, it will only work for TLS 1.1 and BigIP 11.1 and later.

     

    There are a couple ways you could do this or something like it: 1) Use a priority based pool membership where your 1 maintenance server is at a lower priority group than the others. Then when it is time for maintenance, take your primary servers offline and traffic would flow through the VIP to the maintenance server. (No iRules required)

     

    2) Use a simple iRule that can be applied to the VIP when you want to take the site down. My company created a vanity host "sorry.your domain.com" and the iRule does a 302 redirect to the http://sorry address. Because the HTTPS VIP issues the 302 to the HTTP address, you don't end up with the SSL issue but if your site is in a browers "trusted" site list, they may get a warning about being redirected to an "untrusted" site.

     

    3) Use a rule like the ProxyPass iRule that would take the inbound request and remap it on the fly to a different pool & URI on the inside network.

     

    All 3 of these scenarios are viable alternatives to using SNI if it is not available.

     

    One somewhat less desirable option would be to create a multi-name SSL cert for your maintenance VIP that contains all of your other domains as aliases. If your maintenance page is a vanity host header, this is probably not an issue but could be a security risk if your key was compromised and those names reached the live application.

     

  • BinaryCanary_19's avatar
    BinaryCanary_19
    Historic F5 Account

    By the time your irule gets to the HTTP_REQUEST event, the SSL handshake would have already completed (including the certificate warnings).

     

    If you cannot use a certificate with SNI on the LTM, then what you ask does not seem feasible -- because if you are not doing SSL-offloading on the LTM, then you cannot have access to the HTTP events in an irule.