Forum Discussion
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
- Kevin_Stewart
Employee
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_30338Historic F5 Account
Unfortunately there isn't a HTTP::Host function available for the SSH protocol.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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