Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Modifying the source address in Load balancer (URGENT)

Hi
I want to change the source IP address of the packets inside the load balancer when the request is coming from a particular server segment (192.168.100.0 /24).

example: A packet coming from 192.168.100.10 to virtual server 172.10.10.100. In load balancer when the virtual server will direct the request to any of the member servers it should also change the source IP to 172.10.10.100 so that the return part should be via the load balancer. To avoid the internal path between the source and the server directly and we want the request to be load balanced.

will this work in this scenario:
class Hosts {

network 192.168.100.0/24
}

when SERVER_CONNECTED { {

if { [matchclass [IP::client_addr] equals $::Hosts]} {

snat 172.10.10.100
} else {
forward
}
}
}
0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Hi Arijit,

The SERVER_CONNECTED event is triggered after the LTM to server connection has been established, so I'm not sure what the effect of using the snat command would be. Can you change your iRule to use CLIENT_ACCEPTED?

You can check the events wiki page for more info (Click here).

Aaron
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Or if you can alter routing or DNS in some way to push them to a seperate vip, this is preferably from a performance and maintainability prospective...
0