Forum Discussion

Nitin2014_16246's avatar
Nitin2014_16246
Icon for Nimbostratus rankNimbostratus
Sep 17, 2014

Single VIP to support SSL & Non-SSL traffic.

I have a single VIP to support multiple applications by referencing a root context in the uri as follows. The non-SSL traffic applications (off-loading on F5) work but I need to do end-end SSL for one application.

when HTTP_REQUEST { switch -glob [HTTP::uri] { "/mapping-dev" { pool appsstage_mapping HTTP::uri /mapping/mainPage.html } "/SelfServicePortal*" { virtual vs_dsspap1_8080 pool dsspap1_8080_pool }

 "/redex*" {
   virtual vs_dredex_8888
   pool dredex_8888_pool
   }

  "/plm*" {
       pool dplmap1_8080_pool
          }
   "/mstrsbx*" {
       virtual vs_dmstap6_443

!!!! The "/mstrsbx*" root context needs end-end SSL, how do I make it work? All non-ssl works since they are offloading on the F5.

10 Replies

  • You could put a "SSL::disable serverside" at the beginning of the HTTP_REQUEST event, then in the switch statement, use "SSL::enable serverside". Otherwise you would need to issue "SSL::disable serverside" on each match for those sites that need SSL offload.

     

    Devcentral link on SSL iRule commands

     

  • See this discussion.

     

    https://devcentral.f5.com/questions/using-a-server-side-http-and-https-to-different-app-server-pools

     

    it looks like you need to set a server ssl profile on the virtual server, and then disable it for the connections that do not need it with SSL::disable serverside

     

  • SSL Offload is working fine. Its the SSL enable from F5 to the backend servers for "/mstrsbx" which is not working. Will the following work? "/mstrsbx" { SSL::enable serverside virtual vs_dmstap6_443 }

     

    • MiLK_MaN's avatar
      MiLK_MaN
      Icon for Nimbostratus rankNimbostratus
      I don't believe you can actually selectively enable the SSL profile if it didn't exist on the virtual in the first place. Hence why you need the serverssl profile on the virtual, then disable/enable when needed.
  • You need to do 2 things. First, you must assign a server SSL profile to the virtual server. Second, you can either disable the profile on all HTTP paths by adding in SSL::disable serverside OR as also suggested, you could disable it at the top of the HTTP_REQUEST section, and then enable it on the HTTPS path for /mstrsbx

     

  • I tried that, with 'serverssl' profile on the virtual but it broke the other apps. So, you are saying add the server profile on the virtual & disable it individually for non-ssl, is that correct? Thanks.

     

  • yes. that is correct. Like this

    "/redex*" {
        virtual vs_dredex_8888
        pool dredex_8888_pool
        SSL::disable serverside
    }         
    "/plm*" {
        pool dplmap1_8080_pool
        SSL::disable serverside
    }     
    "/mstrsbx*" {
        virtual vs_dmstap6_443
    }  
    
  • Tried the above. Still getting the following, I am using the default 'serverssl' profile. Bad Request

     

    Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.

     

  • ok, here is one I don't know, maybe someone else knows. Since the path we want end to end encryption has the 'virtual' statement in it, which virtual server should the serverside ssl profile be applied to?

     

    If you want to play around, try setting the ssl server profile on vs_dmstap6_443 instead of the main virtual server.

     

    • MiLK_MaN's avatar
      MiLK_MaN
      Icon for Nimbostratus rankNimbostratus
      I don't see the need to call a separate virtual server, just set a different pool and away she goes...