Forum Discussion

babaransari_361's avatar
babaransari_361
Icon for Nimbostratus rankNimbostratus
Jun 15, 2018

https redirection with only one virtual server instance on F5

I need to conigure http to https redirection using a single virtual server only. i have a url "; which should be redirected to "; when i enter the http url in the browser. However i want to acheive this using only a single virtual server on the F5 for that url which can be either on port 80 or 443.

 

8 Replies

  • Haven't built this out in the lab but the procedure should work:

     

    1. Create a virtual server that listens on all ports (e.g. 10.1.0.1:0)
    2. Assign an http profile to the virtual server
    3. Configure SSL termination on the virtual server (clientside is mandatory. serverside is optional depending on the backend pool members)
    4. Create an http-to-https profile or iRule that redirects http traffic to https

    Let me know if you need additional detail on any of these steps.

     

    • AceDawg_204810's avatar
      AceDawg_204810
      Icon for Cirrus rankCirrus

      Need a little more information to be able to assist.

       

      Please post the configuration that you tried to implement:

       

      1. SSH to the F5
      2. tmsh list ltm virtual VirtualServerName
      3. tmsh list ltm irule iRuleName
  • Haven't built this out in the lab but the procedure should work:

     

    1. Create a virtual server that listens on all ports (e.g. 10.1.0.1:0)
    2. Assign an http profile to the virtual server
    3. Configure SSL termination on the virtual server (clientside is mandatory. serverside is optional depending on the backend pool members)
    4. Create an http-to-https profile or iRule that redirects http traffic to https

    Let me know if you need additional detail on any of these steps.

     

    • AceDawg1's avatar
      AceDawg1
      Icon for Nimbostratus rankNimbostratus

      Need a little more information to be able to assist.

       

      Please post the configuration that you tried to implement:

       

      1. SSH to the F5
      2. tmsh list ltm virtual VirtualServerName
      3. tmsh list ltm irule iRuleName
  • There are multiple example about this question on devcentral!

     

    But the big question is : WHY?

     

    It is so simple to create 1 http virtual server which is configured with _sys_https_redirect, and another https virtual server configure to manage legitimate traffic!