Forum Discussion
SNAT pool and persistence
Hi,
I know this post is very old , but i got into the same issue but the internet search for the irule has landed over here.
My goal is to match client IP to SNAT (one to one mapping). I found an irule, but that is very long (manual typing and for bigger subnet cannot apply since that will be longer than 65536 characters which irule can take).
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 172.16.56.10/32] }{
snat 172.16.56.10
}
if { [IP::addr [IP::client_addr] equals 172.16.56.11/32] }{
snat 172.16.56.11
}
if { [IP::addr [IP::client_addr] equals 172.16.56.12/32] }{
snat 172.16.56.12
}
.
.
.
.
"and till all the one to one mapping"
}
However, this is not useful for longer subnets.
Is there a way to match the third and last octect of the IP of the client to SNAT IP.
The above irule shows about the thrid octect only , is there a way to match 3rd and 4th octect?
Zanoob
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