远程 FTP 无法在 Ubuntu 16 上访问 vsftpd

远程 FTP 无法在 Ubuntu 16 上访问 vsftpd

我跟着教程安装和配置 vsftpd 服务。

从本地服务器连接,但远程连接立即被拒绝。这是配置文件内容:

# /etc/vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
ftpd_banner=Welcome to "My Cool" FTP service.
chroot_local_user=YES
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
chown_uploads=YES
chown_username=www-data
ftpd_banner=Welcome to mZoo FTP service.
chroot_local_user=YES
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
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
ssl_enable=NO
user_sub_token=$USER
pasv_min_port=40000
pasv_max_port=50000
force_dot_files=YES

21端口似乎是开放的:

telnet localhost 21
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 Welcome to "my cool" FTP service.

我尝试过禁用fail2ban,但uwf似乎都不是原因。

远程连接没有出现在 中/var/log/vsftpd.log,但也许只记录传输而不记录实际连接。

顺便说一句,uwf状态是(但即使不活动也没有连接):

Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
20/tcp                     ALLOW       Anywhere                  
21/tcp                     ALLOW       Anywhere                  
40000:50000/tcp            ALLOW       Anywhere                  
990/tcp                    ALLOW       Anywhere                  
OpenSSH (v6)               ALLOW       Anywhere (v6)             
20/tcp (v6)                ALLOW       Anywhere (v6)             
21/tcp (v6)                ALLOW       Anywhere (v6)             
40000:50000/tcp (v6)       ALLOW       Anywhere (v6)             
990/tcp (v6)               ALLOW       Anywhere (v6) 

IP 表输出这个要点如果相关的话。

相关内容