Forum Discussion

Luc_Grisez's avatar
Luc_Grisez
Icon for Altostratus rankAltostratus
Aug 16, 2017

Hide/change Incoming port on Virtual Server

Hello,

 

We have backend applications A and B, listening on port 8443. F5 loadbalances this, listening to standard port 443 and redirects the client requests to port 8443 on the applications. The applications A and B do send some HTTP 302 redirects (eg: A redirects to B:8443 and B redirects to A:8443) and HTML forms with port 8443 in the POST URL. How can we set up F5 to capture does redirects and HTML form URLs so that the clients only receive 443 ports and never see port 8443 URLs?

 

2 Replies

  • Hello,

     

    Thx for the replies.

     

    We finally intercepted the HTTP replies coming from the backend server going back to the clients with the 302 redirects in it. Some were in the headers others in a HTTP post.

     

    when HTTP_RESPONSE { Rewrite the Location header for redirects if { ( [HTTP::header exists Location] ) and ( [HTTP::header Location] contains ":8443/" ) } { set new_uri [string map {:8443/ /} [HTTP::header "Location"]] HTTP::header replace Location $new_uri } }

     

    and

     

    when HTTP_RESPONSE { Rewrite the Location header for redirects if { ( [HTTP::header exists Location] ) and ( [HTTP::header Location] contains ":8443/" ) } { set new_uri [string map {:8443/ /} [HTTP::header "Location"]] HTTP::header replace Location $new_uri } }