I have multiple websites which are currently on Microsoft TMG. I want to migrate them to F5. There are multiple URLS hosted on different servers which are running on different ports as well.
I have only one Public IP. I have created pools for different servers and i have applied the certficate on the VIP as well.
All the traffic should be SSL from the client side.
I would use two VIPs, one for HTTP and one for HTTPS. On the HTTP VIP you will want to create an iRule that redirects to HTTPS. You can use the built in iRule that exists for this, _sys_https_redirect or somthing like this if you want a 301 if you ever plan to use HSTS:
when HTTP_REQUEST {
set my_loc "https://[HTTP::host][HTTP::uri]"
TCP::respond "HTTP/1.1 301 Moved Permanently\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n"
TCP::close
}
On the HTTPS VIP you will want to create a client SSL Profile for each site and use the “Server Name” field to enable SNI. With SNI you will need to create one of those profiles as the default for legacy clients, but you can also set the default profile to require SNI if you so desire.
I would use two VIPs, one for HTTP and one for HTTPS. On the HTTP VIP you will want to create an iRule that redirects to HTTPS. You can use the built in iRule that exists for this, _sys_https_redirect or somthing like this if you want a 301 if you ever plan to use HSTS:
when HTTP_REQUEST {
set my_loc "https://[HTTP::host][HTTP::uri]"
TCP::respond "HTTP/1.1 301 Moved Permanently\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n"
TCP::close
}
On the HTTPS VIP you will want to create a client SSL Profile for each site and use the “Server Name” field to enable SNI. With SNI you will need to create one of those profiles as the default for legacy clients, but you can also set the default profile to require SNI if you so desire.
I have applied the rules, for default bulitin HTTP to HTTPS and one has mention below ltm rule PROXY_TEST2 { partition REVERSE_PROXY when HTTP_REQUEST { set my_loc “https://[HTTP::host][HTTP::uri]” TCP::respond “HTTP/1.1 301 Moved Permanently\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n” TCP::close } I have created two VIP one for HTTPS and one for HTTP but no luck. i can see the hit on VS and secuirty error page but not able to open the page.
I have applied the rules, for default bulitin HTTP to HTTPS and one has mention below ltm rule PROXY_TEST2 { partition REVERSE_PROXY when HTTP_REQUEST { set my_loc “https://[HTTP::host][HTTP::uri]” TCP::respond “HTTP/1.1 301 Moved Permanently\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n” TCP::close } I have created two VIP one for HTTPS and one for HTTP but no luck. i can see the hit on VS and secuirty error page but not able to open the page.
So the redirect sends you from HTTP to HTTPS correctly and you are presented a certificate. Does the certfiicate match what you would expect to be presented? i.e. https://site1.test.com/ is presented the certificate for site1.test.com?
One irule, the top one, for your HTTP VIP to handle to redirects(including accounting for www adn redirecting without it) and one iRule, the second one on the HTTPS VIP for pool selection.
One irule, the top one, for your HTTP VIP to handle to redirects(including accounting for www adn redirecting without it) and one iRule, the second one on the HTTPS VIP for pool selection.
I added a comment above for the previous question. Looking at your config here, do you have one certificate that will cover the three different domains? or do you have three different certificates? You only have one client-ssl profile attached. If you have three different certificates, you will need three different profiles with SNI enable by using the “Server Name” field mentioned in my first comment.
I have removed the irule only i have only one irule on the HTTPS VIP. but still the same.
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { “enoclubricants.com” { pool ENOCLUBRICANTSPP1 } “enocvettingsiredev.enoc.com” { pool ENOCVETTING } “wrench.enoc.com” { pool WRENCH_POOL } default { Use pool attached to virtual - no action required } } }