Forum Discussion
TNY_122436
Nimbostratus
Oct 14, 2015iRule snat to certain pool member
Hello,
I have a VIP that load balances to two pool members: poolA and poolB. PoolA takes priority, but if and when traffic gets load balance to poolB, it needs to use a snat of 192.168.1.1. How can I write an iRule to make this work?
2 Replies
- Stanislas_Piro2
Cumulonimbus
try this:
when LB_SELECTED { if {[IP::addr "[LB::server addr]" equals "1.2.3.4"]} { snat automap } } - Stanislas_Piro2
Cumulonimbus
when LB_SELECTED { set poolBaddr "4.3.2.1" set snatAddr "1.2.3.4" if {[IP::addr "[LB::server addr]" equals $poolBaddr]} { snat $snatAddr } unset poolBaddr unset snatAddr }
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