Forum Discussion

Kevin_Jones_505's avatar
Kevin_Jones_505
Historic F5 Account
Jan 20, 2006

IP address translation based on source IP address

I'd like my iRule to choose a pool based on the client's IP address. That part is easy. Beyond that, for some of the pools I'd like to perform address translation, but not for others. Since address translation is usually a property at the Virtual Server level, I'm hoping I can perform it (or not) within an iRule.

 

 

thanks for any ideas

5 Replies

  • Kevin_Jones_505's avatar
    Kevin_Jones_505
    Historic F5 Account
    Sorry, I should be more clear. I don't want the client address to change, what I'd like to control is whether the destination address changes. I know I can turn that on or off on the virtual server level, but I'd like to choose whether to translate from the virtual address to the node address within a rule. Some packets would get the destination address translated, some would not.
  • Kevin_Jones_505's avatar
    Kevin_Jones_505
    Historic F5 Account
    I'm not being very clear. I do want to make a decision based on the client's IP address, so the begining of this rule would be fine:

     

     

    when HTTP_REQUEST { if {[IP::addr [IP::client_addr] eq "10.10.0.0/24" ]}

     

     

    But the actions in the rule either do standard processing (pool http_pool) or choose single device (member 192.168.5.4 8280) but both change the destination address.

     

     

    { pool http_pool member 192.168.5.4 8280 } else { pool http_pool }}

     

     

    But, I want to choose whether or not to forward the packet (not do destination address translation) or to load balance the packet (normal pool stuff) based on the client. The 4.X "forwarding pool" could have done it - is there a way in 9.X?