Forum Discussion
sp1at_86630
Nimbostratus
Mar 21, 2009rule to replace vip ip with pool member
Hi All,
How do i rewite the stream on an incomming request to replace the vip address with the ip of the pool member selected?
here is what i think the rule should look like, is it correct?
when SERVER_CONNECTED {
STREAM::disable
STREAM::expression @HOST=10.10.10.10@HOST=[LB::server addr]@
STREAM::enable
}
- L4L7_53191
Nimbostratus
I think a stream will only act on the HTTP payload, not the headers. You'll probably want to use an iRule for this...here's something that will hopefully get you close (not tested):when HTTP_REQUEST { HTTP::header replace Host [LB::server addr]:[LB::server port] }
- sp1at_86630
Nimbostratus
That will not work for this. It's an oracle connection SID in the tcp payload. - L4L7_53191
Nimbostratus
In that case, I think you'll work (from a connectivity standpoint) without any issues. Ideally setup the oracle client to point to the virtual server address in tnsnames.ora as opposed to the real server address. The BigIP is a NAT device, so as the traffic flows through the BigIP it'll do destination address translation back to the selected server. - hoolio
Cirrostratus
If you want to rewrite the TCP payload, I think you'd need to enable the stream filter in CLIENT_ACCEPTED. Enabling the stream filter in SERVER_CONNECTED only seems to allow you to rewrite the response from the server to LTM.when CLIENT_ACCEPTED { Make a load balancing decision set lb_select [LB::select] Now use the selection eval $lb_select Replace the virtual server IP with the selected pool member IP STREAM::expression "@[IP::local_addr]@[LB::server addr]@" Enable the stream filter STREAM::enable log local0. "Stream expression: @[IP::local_addr]@[LB::server addr]@" }
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