Forum Discussion
F5-Geek
Nimbostratus
Sep 18, 2018Irule help
To create a irule to create a client ssl profile and server ssl profile on Virtual server using SNI
with a wildcard certificate with SAN.
This virtual server would used for different environmet ...
youssef1
Cumulonimbus
Sep 19, 2018Hi,
Find below irule you need.
when HTTP_REQUEST {
set abc1 0
set abc2 0
set abc3 0
switch -glob [string tolower [HTTP::host]] {
" abc1.com" {
set abc1 1
HTTP::header replace Host "abcsecure1.com"
}
" abc2.com" {
set abc2 1
HTTP::header replace Host "abcsecure2.com"
}
" abc3.com" {
set abc3 1
HTTP::header replace Host "abcsecure3.com"
}
default {
do nothing
}
}
}
when SERVER_CONNECTED {
if {$abc1} {
SSL::enable serverside
SSL::profile server-ssl-profile-abc1
} elseif {$abc2} {
SSL::enable serverside
SSL::profile server-ssl-profile-abc2
} elseif {$abc3} {
SSL::enable serverside
SSL::profile server-ssl-profile-abc3
} else {
SSL::enable serverside
SSL::profile serverssl-insecure-compatible
}
}
As you can noticed I set you a differente ssl server profile depending hostname you entered. is just an example.
You can set the same if wanted.
regards,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
