Forum Discussion
Tyler_Lund_1130
Nimbostratus
Jan 18, 2006Selective Source NATing
Hello,
I have one BigIP system running 9.1 on which I've deployed the following iRule to turn on source NATing based on a particular source address:
when LB_SELECTED {
if { [IP::addr [IP::remote_addr] equals ""] } {
snat (or automap)
} else {
snat none
}
}
This works great. I need to duplicate this functionality in 4.5. 4.5 doesn't appear to have a snat command, but a hidden version of snatpool seems to exist. I was thinking of something like:
snatpool internal_snat_pool {
member 1.2.3.4
}
if (client_addr == netmask {
use snatpool internal_snat_pool
}
use pool
Does this sound reasonable? The only bummer is that It appears I'd have to have one of these rules for every virtual server, where as in 9.x I can reuse the same rule over and over.
3 Replies
Sort By
- Colin_Walker_12Historic F5 AccountIt looks like you're on the right track. That should work the way you're looking for it to, provided you get the right information in there for the variables.
- Tyler_Lund_1130
Nimbostratus
Thanks.snatpool internal_snat_pool { member 216.27.85.193 } rule SNAT_Internal_Test { if (client_addr == 216.27.85.192 netmask 255.255.255.224) { use snatpool internal_snat_pool } use pool Test-Pool }
- Martin_MachacekHistoric F5 AccountTyler,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects