Forum Discussion
Dafydd__Rhys-Jo
Mar 31, 2006Historic F5 Account
Hurting eyes, could someone check this?
Hey all,
Running 9.0.5, I have these rules in place:
rule cyclone_ftp_hhtp_request {
when HTTP_REQUEST {
if { [HTTP::uri] contains "ftp" } {
node 192.168.250.144
}
else {
pool cycloneprod
}
}
}
rule cyclone_test {
when CLIENT_ACCEPTED {
if { [IP::protocol] == 21 } {
node 192.168.250.128
}
else {
pool cyclonetest
}
}
}
rule cyclone_FTP {
when CLIENT_ACCEPTED {
if { [IP::protocol] == 21 } {
node 192.168.250.144
}
else {
pool cycloneprod
}
}
}
On a round robin LB, the ftp connection request, are still load balancing instead of going directly to the nodes. Is there a different method you guys would recommend for this?
Thanks in advance for the help!
6 Replies
- Colin_Walker_12Historic F5 AccountWell, it looks like you're using the IP::protocol command where you'd probably want to use something closer to TCP::client_port
The IP::protocol command doesn't return the port address of the transfer protocol you're using, it returns the actual value of the protocol field.
There's a decent list of them here: Click here
So, you'd want to change your two FTP rules to look more like:when CLIENT_ACCEPTED { if { [TCP::client_port] == 21 } { node 192.168.250.128 } else { pool cyclonetest } }
And:when CLIENT_ACCEPTED { if { [TCP::client_port] == 21 } { node 192.168.250.144 } else { pool cycloneprod } }
HTH,
-Colin - Dafydd__Rhys-JoHistoric F5 AccountThank you, but wouldn't that be based off of the client that is connecting? If so, the client port can be any port number. The server port is 21.
- unRuleY_95363Historic F5 AccountYeah, you'll want to use [TCP::local_port]!
- Dafydd__Rhys-JoHistoric F5 AccountWhat about [TCP::server_port]?
- JRahm
Admin
that will work on the clientside events, and it might work on serverside events, depending on whether you are using standard ports or not - Dafydd__Rhys-JoHistoric F5 AccountSo the safe bet would be [TCP::local_port] because that's where the client is connecting to on the VIP. Sounds like that will work. Thanks all!
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