Forum Discussion
Brian_Herr_1028
Nimbostratus
Feb 13, 2007Changing destination pool TCP port via iRules
Nickel tour: In order to change the destination port on a flow we have to define the pool, member, and port as the destination in the iRule. We need to be able to define the pool and port and le...
unRuleY_95363
Mar 08, 2007Historic F5 Account
Please try Colin's suggestion with your rule:
when CLIENT_ACCEPTED {
set dport [TCP::local_port]
if { [lsearch $dport [list 12005]] != -1 } {
TCP::collect 1
return
}
}
when CLIENT_DATA {
if { [TCP::payload] contains "myData" } {
set new_port 12007
}
TCP::release
}
when LB_SELECTED {
LB::reselect pool [LB::server pool] member [LB::server addr] $new_port
}
This should cause the load-balancing engine to pick a pool member as normal, but then override the port/service with the one you want.
We'll have to think about your suggestion.
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