For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

phildoyle's avatar
phildoyle
Icon for Nimbostratus rankNimbostratus
Jun 11, 2015

redirect http/https to new destination port

folks

 

I'm running an ltm 11.4.1

 

I want to take a url

 

http://mysite.com/path1

 

and redirect it to

 

http://mysite.com:7777/path1

 

I also want to change

 

https://mysite.com/path1

 

to

 

https://mysite.com:4443/path1

 

is an irule the best way to approach this?

 

if so can someone point me in the right direction please

 

thanks to anyone taking the time to reply

 

4 Replies

  • Hi, Do you want to redirect the client to another VS listening on another port or do you want to forward traffic from your port 80/443 VSs to your server pool which is listening on the new ports? If it's the first option then irules below would be a good starting point;

    when HTTP_REQUEST {
      HTTP::redirect "http://[HTTP::host]:7777[HTTP::uri]"
    }  
    
    when HTTP_REQUEST {
      HTTP::redirect "https://[HTTP::host]:4443[HTTP::uri]"
    } 
    
  • If you wanted to keep the front-end services as conventional ports (80 and 443) you could configure the virtual with translate-port enabled (the default) and in the pool, have the members configured for the ports where the service is actually available. That would accomplish a destination port re-write that is invisible to front end clients.

     

    Mike

     

  • If you directly connect to Does it work? Do you have HTTP and SSL profiles set up? Check SNAT too.

     

    Cheers, Mike