Forum Discussion
D_Tech_19468
Nimbostratus
Jul 01, 2013changing SNAT pool every week by iRule
Hi All,
Would like to check is there any way to write an iRule about this.
- Require to change snatpool every week - Wednesday
- After Wednesday, the server will stick to the ne...
Kevin_Stewart
Employee
Jul 02, 2013Here's just ONE idea:
when RULE_INIT {
set static::SNAT_0 "10.80.0.100"
set static::SNAT_1 "10.80.0.101"
set static::SNAT_2 "10.80.0.102"
set static::SNAT_3 "10.80.0.103"
}
when CLIENT_ACCEPTED {
find SNAT pool
eval "set snat_id \$static::SNAT_[expr { [clock format [clock seconds] -format %W] %4 }]"
log local0. $snat_id
snat $snat_id
}
This would cycle a list of 4 snat IPs/pools (%4 - modulus 4 in the equation) per week.
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