Forum Discussion
lboogie25_20449
Dec 13, 2015Nimbostratus
Basic iRule
Sirs and Ma'ams:
I'm new to F5 (even newer to iRules) and I'm stuck on comprehending the operators/commands. What I'm trying to do is handle traffic from Linux machines and send to one pool whil...
Kai_Wilke
Dec 14, 2015MVP
Hi Lboogie25,
you may try this snippet if each pool needs a different IP address filter...
when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals x.x.x.x/24] and ([TCP::local_port] == 80) } then {
pool HTTP-Pool
} elseif { [IP::addr [IP::remote_addr] equals x.x.x.x/24] and ( [TCP::local_port] == 22 ) } then {
pool SSH-Pool
}
}
... or if both pools using the same IP address filter, then try this snippet...
when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals x.x.x.x/24] {
if { [TCP::local_port] == 80 } then {
pool HTTP-Pool
} elseif { [TCP::local_port] == 22 } then {
pool SSH-Pool
}
}
}
Cheers, Kai
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