Forum Discussion
rajesh1
Nimbostratus
May 02, 2012IRULE - Using a differnt snatpool based on the client ip address
Hello All,
I need to perform SNAT in the current setup to route the return traffic via the F5.
I am looking for an Irule on a virtual server to use a different snatpool based on th...
MiLK_MaN
Nimbostratus
May 02, 2012You have a few options, but the best two will to either use a switch statement, or use a data group.
By using the switch command, you can do something like:
switch [IP::client_addr] {
"1.1.1.1" { snatpool Y }
"2.2.2.2" { snatpool Y2 }
etc...
}
You can add a default statement at the end to catch anything that is not matched.
If you want to create a data group, you can create one with a type of string, with a name := value pair of client IP := snatpool name.
Then, an iRule with something like:
if { [set snatpoolname [class lookup [IP::client_addr] ] ne "" } {
snat $snatpoolname
} else {
}
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