Forum Discussion
Using "Intelligent SNAT" for outbound traffic?
there are a couple of issues with that iRule
SERVER_CONNECTED won't be hit until there is a connection with the server, that connection needs to use the SNAT address you want so you should do this earlier, the CLIENT_ACCEPTED event is a good one.
then you do need to swap [IP::remote_addr] to [IP::local_addr] as that is the IP of the server you are connecting to (seems weird, but this is looking from the big-ip point of view)
i mocked something up that works fine on a forwarding IP or performance L4 virtual server
when CLIENT_ACCEPTED {
if { [IP::addr [IP::local_addr] equals 30.30.30.30/24] } {
snat 10.10.20.50
} elseif { [IP::addr [IP::local_addr] equals 40.40.40.40/32] } {
snat 10.10.10.20
} else {
snat none
}
}
now it is up to you to add the classmatch stuff again if you need it. again if you get stuck post here.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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