1

I am running vsftpd on my Ubuntu 14.04 server. I can easily connect to the ftp server when I'm on the same network and connect to it using its local ip. I use to be able to connect to it using my network's external ip from anywhere but just recently that stopped working. I have port 20 and 21 forwarded to the server properly so that is not the problem. I used a port checker online to see if my ISP was blocking port 21 but it is open. I have tested sftp and that works using my external ip. but i would like to set up ftp as well.

error code

Status: Connecting to [EXTERNAL-IP]:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/braden"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode ([EXTERNAL-IP],203,132)
Command:    LIST
Error:  The data connection could not be established: ECONNREFUSED - Connection refused by server

vsftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=007
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
  • 1
    have you found a solution yet? I'm receiving the same problem with ECONNREFUSED being raised once the LIST request comes in. If I temporarily set enable_ssl=NO I'm able to connect. My configuration was working until a week ago. – Michael Steele May 23 '16 at 21:57
  • It just started working again randomly. – gommb May 23 '16 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.