How can I monitor my FTP server?

How do I monitor what commands my ftp application is sending to a ftp server

  • F Is there a way to monitor the FTP port so that I can know what commands my FTP application is sending to a FTP server? I am using a closed-source FTP client application, which is not working with a closed-source FTP application server. The client and the server are not communicating well with each other, and I would like to find out why. I wish to reverse-engineer the client to see what commends the client are sending to the sever. I used a web test tool before that allowed me to monitor the content transferring through HTTP, but I can't seem to find such tool for FTP. I appreciate it if you can help me out, thanks.

  • Answer:

    Sounds like you need a http://sectools.org/sniffers.html - assuming your network admins/company policy allows it...I have used wireshark fairly successfully before. The core FTP commands should be visible in the packets.

Alvin at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

You can use the Wireshark application: http://www.wireshark.org/ It should have decent parsing capabilities for FTP as well as other protocols.

kshahar

Can you configure a proxy with the client? Then you could install an ftp proxy server using the logging on that to see what's going on? There's a proxy server for Linux here: http://frox.sourceforge.net/doc/FAQ.html Paul.

Paul

Do you have access to ftp-server logs? Its likely those commands would be logged there. If they aren't, your next option would be to configure the server to log them, if you have access. If thats not an option or server does not log such things, then you have to go to either packet sniffer or a proxy, as suggested by previous posters.

Tuminoid

On Unix, tcpdump might be your friend. Maybe you should first state which OS you're targeting, though.

Thomas Tempelmann

If you have the ability (often requiring root access) to use a packet sniffer, http://www.circlemud.org/~jelson/software/tcpflow/ sniffing the TCP control channel will show you the commands and responses going back and forth in an easy-to-read format. If you don't have such access, tools such as ktrace and strace will allow you to see all data read and written on the socket for this connection, though it will be a little work to extract it. If you could tell us just what tool you were using for HTTP traffic, that would allow us to look for something similar for FTP traffic.

Curt Sampson

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.