Forum Discussion

Lance_Simon_557's avatar
Lance_Simon_557
Historic F5 Account
Jul 12, 2007

appending port to HOST

If we go directly to a cacheing server with the url of http://123.abc.com:7777 everything works fine. However, need to have traffic going to SSL VIP first, then sent to pool members who listen at 7777. We get unknown host errors going through the BigIP this way.

 

When tcpdumps are taken, the only difference in the GET is that going direct the Host = 123.abc.com:7777

 

but through the BigIP the Host = 123.abc.com

 

 

I need an iRule that will append the ":7777" to the host, do not want a redirect. I have tried different things but I am unable to come up with the correct arguments. I know this shold be fairly easy to do for someone with iRule skills.

 

 

Any suggestions?

 

 

Thanks,

 

 

Lance

3 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Hi Lance -

     

     

    If your pool members are defined with port 7777, all you should have to do it make sure port translation is Enabled on the virtual server (Configuration / Advanced section of the virtual server definition screen). Should be on by default.

     

     

    HTH

     

    /deb
  • Lance_Simon_557's avatar
    Lance_Simon_557
    Historic F5 Account
    OOPS...sorry for the confusion. The packet is getting sent to the correct port, but the server apparently needs to see the "123.abc.com:7777" in the Host header.

     

  • To modify the Host value, you'll have to modify the "Host" HTTP header.

    when HTTP_REQUEST {
      if { ! ([HTTP::host] ends_with ":7777") } {
        HTTP::header replace "Host" "[HTTP::host]:7777"
      }
    }

    -Joe