Forum Discussion

Michael_Woods_5's avatar
Michael_Woods_5
Icon for Nimbostratus rankNimbostratus
Jan 05, 2007

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!
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    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

     

    }

     

  • 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