No connection could be made because the target machine actively refused it
Hi I'm new in this forum. I'll be thankful if there is someone who can help me.
I'm using vsftpd on my ubuntu 20.04 !
I tested at the first vsftpd without SSL with active mode. It worked fine! But when I enabled my SLL with active mode I get an error to pass to the passive mode! So I passed to passive mode and I add in my
this is my firewall status !
and if I test my vsftpd server in WinSCP i get this error !
I don't know what to do ???
I'm using vsftpd on my ubuntu 20.04 !
I tested at the first vsftpd without SSL with active mode. It worked fine! But when I enabled my SLL with active mode I get an error to pass to the passive mode! So I passed to passive mode and I add in my
/etc/vsftp.conf
:
vsftpd_log_file=/var/log/vsftpd.log tcp_wrappers=YES pasv_enable=Yes pasv_min_port=40000 pasv_max_port=50000 pasv_address=51.91.250.89 allow_writeable_chroot=NO user_sub_token=$USER local_root=/home/$USER/ftp userlist_enable=YES userlist_file=/etc/vsftpd.userlist userlist_deny=NO
root@VPS:/# sudo ufw status Status: active To Action From -- ------ ---- Nginx HTTP ALLOW Anywhere 20:21/tcp ALLOW Anywhere 40000:50000/tcp ALLOW Anywhere Nginx HTTP (v6) ALLOW Anywhere (v6) 20:21/tcp (v6) ALLOW Anywhere (v6) 40000:50000/tcp (v6) ALLOW Anywhere (v6)
. 2021-04-15 12:43:51.167 Using FTP protocol. . 2021-04-15 12:43:51.167 Doing startup conversation with host. > 2021-04-15 12:43:51.183 PWD < 2021-04-15 12:43:51.245 257 "/" is the current directory . 2021-04-15 12:43:51.245 Getting current directory name. . 2021-04-15 12:43:51.293 Retrieving directory listing... > 2021-04-15 12:43:51.293 TYPE A < 2021-04-15 12:43:51.339 200 Switching to ASCII mode. > 2021-04-15 12:43:51.339 PASV < 2021-04-15 12:43:51.402 227 Entering Passive Mode (51,91,250,89,188,92). > 2021-04-15 12:43:51.402 LIST -a . 2021-04-15 12:43:51.402 Connecting to 51.91.250.89:48220 ... . 2021-04-15 12:43:52.589 Transfer channel can't be opened. Reason: No connection could be made because the target machine actively refused it. . 2021-04-15 12:43:52.605 Could not retrieve directory listing . 2021-04-15 12:43:52.605 LIST with -a failed, will try pure LIST . 2021-04-15 12:43:52.605 Retrieving directory listing... > 2021-04-15 12:43:52.605 TYPE A . 2021-04-15 12:44:07.809 Timeout detected. (control connection) . 2021-04-15 12:44:07.809 Could not retrieve directory listing * 2021-04-15 12:44:07.880 (EFatal) **Lost connection.** * 2021-04-15 12:44:07.880 Timeout detected. (control connection) * 2021-04-15 12:44:07.880 Could not retrieve directory listing * 2021-04-15 12:44:07.880 Error listing directory '/'.