FTP Username

Is there anything similar to HTTP::username for FTP? I’d like to be able to create an iRule that will read in the username entered during authentication and do whatever I want with it afterwards.

Thanks!

You can use TCP::collect to capture the connection details, then look for the USER request command in TCP::payload & save the argument off to a variable:

when CLIENT_ACCEPTED {

TCP::collect

}

when CLIENT_DATA {

if {[TCP::payload] starts_with “USER” }{

set user [getfield [TCP::payload] " " 2]

log local0. $user

}

TCP::release

}

Thank you…I’ll give it a try!

-mike

Just tried this and for some reason “CLIENT_ACCEPTED” causes a hang where the client waits on the login prompt until timing out… Did this work on your system?

Thanks,

Greg