Forum Discussion
CGI
Altostratus
Sep 27, 2013ftp vip with multiple destinations based on user account
Hi iam looking for way to use on vip address and depending on the username (s1, s2, s3, s4) send the traffic to the specific node. I found the begining to the irule in the forum, but this is for two ...
What_Lies_Bene1
Cirrostratus
Sep 27, 2013I'll knock up a much improved version shortly but this will suffice for now;
when CLIENT_DATA {
set user [regexp -inline {(?:USER\ )(\S+)} [TCP::payload]]
if { [string length $user] > 2 } {
if { [string match -nocase {s1.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
elseif { [string match -nocase {s2.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
elseif { [string match -nocase {s3.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
elseif { [string match -nocase {s4.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
else {
username didn't start with s1-, must be s2-, go to node 2
pool FTP_prod_pool member 10.x.x.2 }
}
TCP::release
}
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