Forum Discussion

eLeCtRoN's avatar
eLeCtRoN
Icon for Cirrus rankCirrus
Apr 08, 2014

iRule Port-Redirect (https URL to another https URL)

I have a external URL example: https://test.f5.com:3400/test this should be terminate on a internal Server https://action.f5.com:8446/test/index.htm. How could I realize that issue ?

 

it would be nice when someone has a good idea or example iRule

 

thx Manu

 

2 Replies

  • Do you mean end to end encryption or does the f5 hold the certificate for test.f5.com?

    If it holds the certificate you can manipulate the uri with an irule, otherwise I'm afraid you need to handle it server side.

    Just create a Virtual server listening to port 3400, assign an SSL client profile and a SSL server profile (the default profile works fine unless your server has special requirements such as a client certificate). Then add a default pool containing a member listening to port 8446.

    Example iRule:

    when HTTP_REQUEST {
    
        set uri [string tolower [HTTP::uri]]
    
        if { $uri eq "/test" } {
            HTTP::uri "/test/index.htm"
            HTTP::header replace Host action.f5.com
        }
    }
    

    /Patrik