Forum Discussion
swo0sh_gt_13163
Sep 16, 2013Altostratus
undefined procedure error in iRule
Hello Folks,
Could you please help me correcting my following iRule?
================================================================
when CLIENT_ACCEPTED {
if {
[IP::addr [IP::remote_addr] equa...
Sep 16, 2013
when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals 172.22.64.0/24] } {
snat 172.22.64.68
log local0. "SNATTed of SiteB"
pool Test_pool
} elseif { [IP::addr [IP::remote_addr] equals 2.2.2.0/24] } {
snatpool NAME_OF_SNAT_POOL
pool Pool_Name
log local0. "SNATTed of SiteA"
} else {
pool Normal
}
}
There was a closing curly bracket missing at the end (related to the event).
Make sure to have all resources defined (pools, SNATPools) before referencing them in your iRule.Are you dealing with a large number of client IPs to translate with different SNATs? Perhaps the 'switch' command will be a better choice:
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