Forum Discussion
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] 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 }
}I am getting following errors while adding it to my F5.
"01070151:3: Rule [/Common/Test] error: line 11: [undefined procedure: elseif] [elseif { [IP::addr [IP::remote_addr] equals 2.2.2.0/24] }] line 15: [undefined procedure: snatpool NAME_OF_SNAT_POOL pool Pool_Name log local0. "SNATTed of SiteA" ] [{ snatpool NAME_OF_SNAT_POOL pool Pool_Name log local0. "SNATTed of SiteA" }] line 21: [undefined procedure: else] [else { pool Normal }]"
I am newbie to programming, hence I couldn't figure out the syntax error. :( Seek for your help.
Thanks, Darshan
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