Forum Discussion
Poiicy based virtual server
I have a question. We have a virtual server with a policy set to load balance to one pool with a specific URL and all others default to another pool. The problem I have is that the URL based pool requires a SNAT pool (the servers use a separate router for gateway) whereas the default requires IP passthrough (no SNAT pool) and uses the F5 as the gateway.
Is there a simple way to achieve this on the F5?
Any help is greatly appreciated.
1 Reply
I assume you mean a Local Traffic Policy? If so, in the "forward" target, you can add an target action using the parameters "snat" or "snatpool" an the same time as you add a pool target.
If you want to use an iRule, you can simply add the "snat" command to the portion of your iRule logic that does the pool selection. The argument to the "snat" command is either "automap", a pool name, or "none".
Here is an example of a Local Traffic Policy that would do a selective SNAT.
ltm policy multi-snat-test { controls { forwarding } requires { http } rules { rule1 { actions { 0 { forward select snatpool /Common/SNATPOOL } 1 { forward select pool THEPOOL } } conditions { 0 { http-uri values { /path1 } } } ordinal 1 } } strategy first-match }
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