Forum Discussion
Kim_Kipp_49723
Nimbostratus
Sep 18, 2013SNAT by Destination IP
I want to mask a network behind an SNAT IP address based on the following criteria: either the leaving interface (WAN) or the desitination IP. Is there a way to solve that by configuration utility? O...
What_Lies_Bene1
Cirrostratus
Sep 18, 2013So, assuming you don't apply the SNAT to the Virtual Server and want to do it all with an iRule, something like this will work if the TESTLAN destination is a single subnet;
when CLIENT_CONNECTED {
Check if the client source IP is from the internal network
if { [IP::addr [IP::client_addr] equals 192.168.10/16] } {
If so, check if the destination IP is in the TESTLAN
if { [IP::addr [IP::local_addr] equals x.x.x.x/xx] } {
If so, don't SNAT
snat none }
If not, SNAT
else {
snat 'name or snat here or specific address'
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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