Forum Discussion

MustphaBassim's avatar
Feb 09, 2023

host header in F5

Hello Dears

i am trying to make the F5 check the host header in client request (when client request the domain) as shown below :

1-abc.com would be go to virual server 10.1.0.1

2-xyz.com would be go to virual server 10.1.0.2

is that double in F5 ?

Bests

  • Just for your information, you should create a listener (VIP on F5) that receives traffic for both hostnames (fully qualified domain names) so that you can assign either of the LTM policy or the irule on that VIP.

    Thanks,

  • Just for your information, you should create a listener (VIP on F5) that receives traffic for both hostnames (fully qualified domain names) so that you can assign either of the LTM policy or the irule on that VIP.

    Thanks,

  • Hello,

    There are two ways you can forward traffic based on the host header.

    The first one is creating an irule which checks on host header inside the http request:

    • You must be terminating the SSL connection on F5 so that the F5 can decrypt the request and checks for the HOST header.
    • then, HTTP profile must be added as well so you can use irule event called "When HTTP request"
    • the last point is creating the irule (programming code based on TCL language) and assignint it on the virtual server.
    • For the irule code, there are many links that you can check and copy the code and just modify it, here is an example:

    The second option is using LTM policy, which can be created using rules and you have the option to forward the traffic to virtual server, pool, or node as per the below screenshot:

     Thanks,

    Mohamed Salah