For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

zblue_123071's avatar
zblue_123071
Icon for Altocumulus rankAltocumulus
Feb 25, 2014

Switch Based off of Name

Hi,

I have a tcp/443 (HTTPS) VIP with an iRule that will allow me to send traffic to a pool based off of the URI; that configuration is:

when HTTP_REQUEST {
    switch [HTTP::host] {
            "x.example.com" {
                    if { [active_members pool-x ] < 1 } {
                            HTTP::respond 200 content [ifile get MaintPage]
                    } else {
                            pool pool-x
                    }   
            } 
            "y.example.com" { 
                    if { [active_members pool-y ] < 1 } {
                            HTTP::respond 200 content [ifile get MaintPage]
                    } else {
                            pool pool-y
                    }   
            } 
            "z.example.com" { 
                    HTTP::redirect http://google.com[HTTP::uri] 
            } 
            default {
                    HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
            }
    }

Basically my question is how (or can) I can do this for SSH traffic. For the HTTP traffic, I can switch using HTTP::HOST - I've looked for something equivalent that I can use with a tcp/22 (SSH) VIP but cannot figure it out.

-Zac

2 Replies

  • Just spitballing here, but given that SSH is not SSL, and that you're not offloading the encrypted data, even if there was some attribute in the SSH payload that you could trigger on to do pool switching, you wouldn't be able to see it anyway.

     

  • Christian_30338's avatar
    Christian_30338
    Historic F5 Account

    Unfortunately there isn't a HTTP::Host function available for the SSH protocol.