Allow or Redirect HTTPS traffic based on destination domain
I have the following iRule working for http traffic on a vs allowing only port 80. I need to do the same thing for https traffic but get cert errors on the client. I have tried turning on clientssl and serverssl on the vs with no change to the behavior.
The requirement behind this it to restrict web traffic from hosts behind the f5 to defined domains only. If there is a better way, please let me know.
when HTTP_REQUEST { switch -glob [HTTP::host] { "microsoft.com" {pool APPDEV-USERVM-TRANSIT} ".msdn.com" {pool APPDEV-USERVM-TRANSIT} "*.windows.com" {pool APPDEV-USERVM-TRANSIT} ".technet.com" {pool APPDEV-USERVM-TRANSIT} ".live.com" {pool APPDEV-USERVM-TRANSIT} default { HTTP::redirect "http://www.abc.com" pool APPDEV-USERVM-TRANSIT
} } }