vsftpd LIST导致GnuTLS错误-15

我有一个运行vsftpd的Arch Linux系统,它在过去的一年里一直在使用FTPES。 在过去两天内,我注意到我的所有FTP客户端都无法通过FTPES进行连接。 在Windows 7上使用FileZilla 3.17.0进行连接时,我注意到在发送目录列表时发生GnuTLS错误-15:

这是使用WAN IP指定主机的被动FTPES:

Status: Connecting to ###.###.###.###:21... Status: Connection established, waiting for welcome message... Status: Initializing TLS... Status: Verifying certificate... Status: TLS connection established. Status: Logged in Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Switching to Binary mode. Command: PASV Response: 227 Entering Passive Mode (###,###,###,###,27,163). Command: LIST Response: 150 Here comes the directory listing. Error: GnuTLS error -15: An unexpected TLS packet was received. Error: Disconnected from server: ECONNABORTED - Connection aborted Error: Failed to retrieve directory listing Status: Disconnected from server 

FileZilla然后重试连接以相同的结果,然后停止尝试连接。 FileZilla以前的版本也显示GnuTLS -110错误,虽然我没有输出保存包含该错误。

我读过一些build议这个问题是由被动FTPconfiguration的问题引起的post。 被动FTP已经在这个服务器上工作了一段时间了,我还没有对任何相关的configuration文件做任何改变。 可以肯定的是,我尝试使用主动模式连接。 一切似乎正常,直到我收到一个非法PORT命令错误,此时FileZilla尝试再次使用被动。

这是使用WAN IP指定主机的“主动”FTPES:

 Status: Connecting to ###.###.###.###:21... Status: Connection established, waiting for welcome message... Status: Initializing TLS... Status: Verifying certificate... Status: TLS connection established. Status: Logged in Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Switching to Binary mode. Command: PORT 192,168,0,7,240,98 Response: 500 Illegal PORT command. Command: PASV Response: 227 Entering Passive Mode (###,###,###,###,27,103). Command: LIST Response: 150 Here comes the directory listing. Error: GnuTLS error -15: An unexpected TLS packet was received. Error: Disconnected from server: ECONNABORTED - Connection aborted Error: Failed to retrieve directory listing Status: Disconnected from server 

这里的问题似乎是,即使我input我的WAN IP地址,主动模式仍尝试使用该PORT命令中的本地IP地址。 另一个FTP客户端,在iOS上的FTP客户端专业版3.0.4,给出错误“服务器似乎不支持活动模式”。 然后,我尝试连接到我的服务器本地,而这一次客户端没有进入被动模式,TLS错误仍然存​​在。

这是使用本地IP指定主机的主动FTPES:

 Status: Connecting to 192.168.0.2:21... Status: Connection established, waiting for welcome message... Status: Initializing TLS... Status: Verifying certificate... Status: TLS connection established. Status: Logged in Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Switching to Binary mode. Command: PORT 192,168,0,7,240,129 Response: 200 PORT command successful. Consider using PASV. Command: LIST Response: 150 Here comes the directory listing. Error: GnuTLS error -15: An unexpected TLS packet was received. Error: Disconnected from server: ECONNABORTED - Connection aborted Error: Failed to retrieve directory listing Status: Disconnected from server 

最后,我试图连接,而不使用encryption。 尽pipe我尽可能避免这种情况,但我必须保留未encryption的连接才能连接一些限制性networking。 FileZilla中的主动和被动设置都在禁用encryption的公共Internet上工作,尽pipe两种types都显示相同的输出:

这是使用WAN IP指定主机的主动/被动普通FTP:

 Status: Connecting to 98.220.249.102:21... Status: Connection established, waiting for welcome message... Status: Logged in Status: Retrieving directory listing... Status: Calculating timezone offset of server... Status: Timezone offset of server is 0 seconds. Status: Directory listing of "/" successful 

由于该服务器位于路由器后面,因此被动FTP将不能在本地工作。 请参阅下面的vsftpd.conf。 为了尝试所有的连接可能性,这里是FileZilla的输出,用于在本地创build一个活动的,未encryption的连接。 它失败了,但我并不太在意,因为我从来没有使用过这些设置组合。

这是使用本地IP指定主机的普通FTP。

 Status: Connecting to 192.168.0.2:21... Status: Connection established, waiting for welcome message... Status: Logged in Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Switching to Binary mode. Command: PORT 192,168,0,7,240,195 Response: 200 PORT command successful. Consider using PASV. Command: LIST Response: 150 Here comes the directory listing. Response: 500 OOPS: priv_sock_get_cmd Error: Failed to retrieve directory listing Error: Connection closed by server 

这是我的/etc/vsftpd.conf ,减去评论。 这本质上是我过去一年成功使用的文件。

 anonymous_enable=NO local_enable=YES write_enable=YES dirmessage_enable=YES xferlog_enable=YES port_enable=YES connect_from_port_20=YES ftpd_banner=Welcome to HOSTNAME (vsftpd on ArchLinux). chroot_local_user=YES allow_writeable_chroot=YES listen=YES ssl_enable=YES force_local_logins_ssl=NO force_local_data_ssl=NO ssl_tlsv1=YES rsa_cert_file=/etc/ssl/certs/vsftpd.pem rsa_private_key_file=/etc/ssl/certs/vsftpd.pem pasv_min_port=7000 pasv_max_port=7100 pasv_address=###.###.###.### 

在发现这个问题之前,最近对我的Arch系统进行了全面升级,并于2016年4月17日进行了upgraded gnutls (3.4.10-1 -> 3.4.11-1) ,包括upgraded gnutls (3.4.10-1 -> 3.4.11-1) 。 最近升级到vsftpd的date是2016年3月9日(3.0.3-1 – > 3.0.3-2),所以我不是只降级gnutls,而是在2016年3月9日使用Arch Linux归档。 这没有帮助,我随后升级系统以匹配当前的存储库。 此处提供的输出是使用截至此职位date(2016年4月23日)的最新系统生成的。 我不确定这个错误到底是从什么时候开始的,因为我不经常使用我的FTP服务器来立即注意到它。

正如我前面所说,自从我的FTP服务器上次工作以来,我的相关configuration没有改变,除了在这里发布信息的变化外。

我的目标是让被动FTPES再次在公共互联网上工作。 如果我必须牺牲未encryption的活动FTP,这是可以接受的,但是我仍然希望在那些我需要的时候保留那些可用的时间。 我需要做些什么来修复这个问题?

我遇到了同样的问题,经过了很长时间的search,我似乎已经find了一个解决方法:将seccomp_sandbox=NO添加到/etc/vsftpd.conf

我的用例是一个仅支持LAN的启用SSL的FTP服务器,所以YMMV。 对于这个问题的一个可能的解释可能在我没有安装由于不兼容的wifi驱动程序而在repos中安装最新的内核中可能发现。

我希望这有帮助 :)