Forum Discussion
port translation for pool member
Hello,
I have a VS which listen on port 443. the pool member needs to listen to different ports according the hostname. For example :
- https://toto.com => GIB-IP (VS 10.1.1.1) => http://node:22020
-
https://titi.com => BIG-IP (VS 10.1.1.1) => http://node:22021
-
The first solution is to creat one VS per port. (the pool member is monitored with right port : 22020 or 22021. But I need to creat as many VS as ports and I have 10 ports.
-
Second solution : The Pool member is monitored with port 80 and I use the IRule associated to only one VS. The Irule should be:
when HTTP_REQUEST {
set HOST [HTTP::host]
switch $HOST {
toto.com {HTTP::header replace Host "[HTTP::host]:22020" }
titi.com {HTTP::header replace Host "[HTTP::host]:22021" }
default { drop }
}
}
But it doesn't work !!! the BIG-IP communicate with pool member with port 80 and not with port implemented in Irule. Do you know why ?
Thank you
2 Replies
- IheartF5_45022
Nacreous
It's not enough to add the port number to the Host header (in fact you may not even need to do that) - you need select a pool based on the port you want (so you will need 10 pools - one for each port);-
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "toto.com" { HTTP::header replace Host "[HTTP::host]:22020" pool pl_mypool_22020 } "titi.com" { HTTP::header replace Host "[HTTP::host]:22021" pool pl_mypool_22021 } default { drop } } }
- steph_01_143006
Nimbostratus
Yes !!! it's working fine
Thank you
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com