Hi there, I’m tring to configure an iRule that permit to a Client to use the right SSL certificates based on the correct Host Header. this is neede because we have 2 SSL certificates one for the external clients and one for the internal ones.
So, unique VIP on 443 to unique pool, 2 SSL certificates where the correct one has to be engadged starting from Host header in the client’s request.
I’m tryng this at this moment, no luck:
when HTTP_REQUEST { set host_name [string tolower [substr [HTTP::host] 0 “:”]] switch -glob $host_name {
set doSSL 0
"internal_hostname" { set doSSL 1 }
"external_hostname" { set doSSL 2 }
default { HTTP::respond403 content "
403 Forbidden from Loadbalancer" log local0. “[HTTP::host] [IP::client_addr] $host_name unknown” } } }
when SERVER_CONNECTED {
SSL::profile ssl_default
doSSL variable is checked and SSL disabled or profile selected
if {$doSSL == 1} {
SSL::profile ssl_internal
} elseif {$doSSL == 2} {
SSL::profile external
}
}
thanks fo your help.