Forum Discussion
lago_53253
Nimbostratus
Aug 20, 2008Port Forwarding
Hi there,
i need an iRule for Port Forwarding.
All Request to Virtual-Server:80 had to go to Pool:81
Something like this:
when CLIENT_ACCEPTED {
if { [TCP::local_port equals 80] } {
pool My_Pool member "ALL_Member" 81
}
}
Thanks for your Help
3 Replies
- Patrick_Chang_7Historic F5 AccountWhat you want to do does not require an iRule. Just set up a pool of servers listening on port 81 and assign that pool to the virtual server listening on port 80. If you really must use an iRule, your example makes it look like you want to pick a specific member of the pool. If you want to just select the pool use the command:
pool my_pool
where my_pool is the name of the pool. When you set up the pool, you specify the port each pool member is listening on. - Nicolas_Menant
Employee
Hi,
This is done automatically when you create a VS on port 80 and a pool with pool members listening on port 81.
The port translation is automatically handled by the BIGIP.
Even if you have something like this:
vs port any -> default pool port any
if you use an iRule that specify this:when CLIENT_ACCEPTED { if { [TCP::local_port equals 80] } { pool My_Pool } }
where My_Pool are members listening on port 81 - lago_53253
Nimbostratus
Sometimes it is so easy...
I did not see this.
Thank you...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects