jacobbbc
asked on
ftp connection problem
Hello experts,
I recently configured my ftp server on centos. I used vsftpd. It works fine. When i connected via command mode it works fine. But when i try to connect using filezilla it shows connected successfully but after that it shows connection timed out error. I already added port 21 in firewall exception. What is the possible cause of this? Thanks in advance.
I recently configured my ftp server on centos. I used vsftpd. It works fine. When i connected via command mode it works fine. But when i try to connect using filezilla it shows connected successfully but after that it shows connection timed out error. I already added port 21 in firewall exception. What is the possible cause of this? Thanks in advance.
btw: if you want to know a bit more about the two modes, have a read of this
http://slacksite.com/other/ftp.html
http://slacksite.com/other/ftp.html
ASKER
@m_walker:
Status: Connecting to ip address:21...
Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 2.0.5)
Command: USER ftp
Response: 331 Please specify the password.
Command: PASS *********
Response: 230 Login successful.
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Features:
Response: EPRT
Response: EPSV
Response: MDTM
Response: PASV
Response: REST STREAM
Response: SIZE
Response: TVFS
Response: 211 End
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (ip address,86,164)
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing
This is the error shown. I also added port 20 to firewall exception.
Status: Connecting to ip address:21...
Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 2.0.5)
Command: USER ftp
Response: 331 Please specify the password.
Command: PASS *********
Response: 230 Login successful.
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Features:
Response: EPRT
Response: EPSV
Response: MDTM
Response: PASV
Response: REST STREAM
Response: SIZE
Response: TVFS
Response: 211 End
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (ip address,86,164)
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing
This is the error shown. I also added port 20 to firewall exception.
Looks like the time out is when the data connection is being setup. That is using Passive mode (PASV), can you give active mode a go. It should be in the settings somewhere in your ftp app.
For passive mode, check the vsftpd.conf file..
look for these settings
pasv_max_port=51100
pasv_min_port=51000
port_enable=YES
pasv_address=<your ip address>
See if port_enable=YES
this is needed to enable passive mode on the ftp server.
For passive mode, check the vsftpd.conf file..
look for these settings
pasv_max_port=51100
pasv_min_port=51000
port_enable=YES
pasv_address=<your ip address>
See if port_enable=YES
this is needed to enable passive mode on the ftp server.
ASKER
I added
pasv_max_port=51100
pasv_min_port=51000
port_enable=YES
this to my vsftpd.conf file but the result now also same.....
pasv_max_port=51100
pasv_min_port=51000
port_enable=YES
this to my vsftpd.conf file but the result now also same.....
try checking on ftp client the send ftp keep-alive commands and see if it helps.
Check your VSFTP log on your server. What error does it report?
Compare the results with local log to ftp and via filezilla.
Compare the results with local log to ftp and via filezilla.
Is the vstfp server running a firewall eg: iptables ? if so ensure port 20 and 21 to the box is allowed.
what permissions do You have on root folder? try changing permissions to 777 or 750?
ASKER
@Tomislavj: I think i have permission because i can login to ftp server from command line and can perform operations....
To confirm a few things.
a) When you say you run ftp from a command line and it works, are you on the server or remote (eg windows)
b) I assume you restarted the vsftpd server when you added the pasv config settings.
c) All tests are done on the same subnet (ie: no remote ftp yet)?
a) When you say you run ftp from a command line and it works, are you on the server or remote (eg windows)
b) I assume you restarted the vsftpd server when you added the pasv config settings.
c) All tests are done on the same subnet (ie: no remote ftp yet)?
ASKER
@m_walker: I connected to my remote ftp server from my pc via ftp. I done all the settings on remote ftp server.
note this is now you calculate what PASV mode your client program is trying to go to..
Response: 227 Entering Passive Mode (ip address,86,164)
((86*256)+164)=22180
now you can work out if your pasv ports are setup correctly
Response: 227 Entering Passive Mode (ip address,86,164)
((86*256)+164)=22180
now you can work out if your pasv ports are setup correctly
ASKER
No use, still the problem is same..
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
@Tomislavj: Thank you so much...Your question is my problem thank you...My problem solved.
Also ftp uses two ports 21 for commands and 20 for data, so add 20 as well to your firewall.