Forum Discussion
Manuel_Gabaldon
Jun 16, 2008Nimbostratus
Hi!!
First of all, IP::remote_addr is a command, not a variable, so you can't change it this way. Secondly, it would return your client IP address (source), not the destination. You need to use the "pool" command in order to change the destination of the packet, with or without destination NAT.
when CLIENT_ACCEPTED {
set firstIP [IP::local_addr]
pool pool_172.16.49.70
}
I don´t think you can insert the old IP in the packet. If we're talking about HTTP, you could insert an HTTP header containing it, like an "X-forwarded-for" header
when HTTP_REQUEST {
HTTP::header First_IP [IP::local_addr]
pool pool_172.16.49.70
}
However, maybe it is a lot easier than you think. It seems that you need to reroute traffic through the second LTM, right? So you need to forward traffic to 172.16.49.70 and let this one make the routing decisions based on destination IP address.
Maybe you can make it by selecting this IP as the pool and disabling the destination NAT.