Forum Discussion

El_Jefe's avatar
El_Jefe
Icon for Nimbostratus rankNimbostratus
May 10, 2011

IP Forwarding question

OK - So, I have a situation where I want the user to type in "http://virtualserverserver.xyz.com/abc" in the browser, and have the F5 re-direct to "http://realserver.xyz.com:8888/abc" This doesn't seem like it would be too hard, but I am having a hard time with it.

 

 

Thanks!

 

4 Replies

  • Hi,

     

     

    Do you just need to have destination IP and port translation performed? Or do you need to rewrite the Host header value based on which server receives the HTTP request?

     

     

    For the former, LTM will do this by default as long as you enable address and port translation on the virtual server properties. This is enabled by default for a standard TCP virtual server.

     

     

    For the latter, you can use an iRule like this:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/rewrite_host_header_to_server_name.html

     

     

    If you're running v10, you should update the above codeshare example to use the class command instead of the findclass command:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/class

     

     

    Aaron
  • I don't think I need to re-write a header at all. I just need the virtual to forward them to the physical.
  • So you can configure a standard TCP virtual server pointing to a pool of servers defined on their IP and port 8888. LTM will translate the IP and port when it establishes a connection with the pool members. If you want LTM to parse the traffic as HTTP (for cookie persistence, inspecting/modifying layer 7 properties) you can add an HTTP profile.

     

     

    Aaron