sgamer
Aug 28, 2013Nimbostratus
iRule that source SNATs based on destination
We have a server pool in an Internet DMZ that requires the source IP addresses of the servers to be translated into the VS IP address when it's communicating with the Internet. The servers also need to communicate with internal resources using their real IP addresses. I'm new to iRules so I'm wondering if the following is close to correct and/or is there a better way to accomplish it?
when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals 10.0.0.0/8] or [IP::addr [IP::client_addr] equals 192.168.0.0/16] } { snat none } elseif { snat 1.1.1.1 } }