2

I've got an VPS in germany running Debian X64. I have very strange issue.

I have ISPConfig CP installed using proftpd and I can not connect to FTP by any means.

Few hours ago I've had installed DirectAdmin on CentOS same VPS and same issue.

Simply when I connect to FTP server I get these:

 Status:    Resolving address of web02.defikon.com
Status: Connecting to 130.255.190.71:21...
Status: Connection established, waiting for welcome message...
Response:   220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:   220-You are user number 1 of 50 allowed.
Response:   220-Local time is now 12:15. Server port: 21.
Response:   220-This is a private system - No anonymous login
Response:   220-IPv6 connections are also welcome on this server.
Response:   220 You will be disconnected after 15 minutes of inactivity.
Command:    USER default1
Response:   331 User default1 OK. Password required
Command:    PASS ******
Response:   230-User default1 has group access to:  client0    sshusers  
Response:   230 OK. Current restricted directory is /
Command:    OPTS UTF8 ON
Response:   200 OK, UTF-8 enabled
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is your current location
Command:    TYPE I
Response:   200 TYPE is now 8-bit binary
Command:    PASV
Error:  Connection timed out
Error:  Failed to retrieve directory listing

I even tried telnet localhost 21 and the same happends. Once I issue command "LIST" I get time out. I've tried every thing and I can't get this to work =(

Please help !

P.S.: iptables is turned off.

0

3 Answers 3

5

FTP uses more than a single port. TCP 21 is for the command channel only. When you do a directory listing, you're transferring the result through the data channel.

Since you're using passive mode, the server will open a random high port (> 1024) for the data channel and the client must open a second TCP connection to that port.

Typically, right after the PASV command, the server should answer with

227 Entering Passive Mode (130,255,190,71, 4, 128)

This will tell your client that the server 130.255.190.71 is listening to you on port (4*256 + 128)=1152

So: - Try to get the raw message, including the answer from the server (the response to the PASV command) - Check your firewall rules again

1
  • Thanks for response, the problem was fixed once my Provider fixed bug in Virtualization software. It seems it was causing all new ports to be blocked. I'm aware of how FTP works though. I've shutdown all possible firewalls and network settings to fit perfectly, that's why I couldn't figure what was the issue. Jul 11, 2012 at 15:32
1

FTP won't work if you AND your ftp server are both behind firewalls. It can be made to work, but it's brittle and involves live pigeons and voodoo powder.

You might see if you could use SFTP, which would connect using an encrypted connection and works very well with dual firewalls (I use it with my systems).

If you can ssh into the machine, then you can use rsync, sftp and scp to move files back and forth, even full subdirectory trees. sftp is pretty much ftp, just over the ssh/ssl link.

I realize you're on a VPN, but encryption never hurts, and FTP broadcasts everything in the clear. (I suppose stunnel could help there, but still... ftp is old and doesn't play well with firewalls.)

0

The problem was fixed yesterday. FTP issue was caused by SolusVM bug. Issue was fixed and FTP is now working fine.

Thanks for all the responses.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .