FTP处于被动模式:EHOSTUNREACH-没有到主机的路由

FTP处于被动模式:EHOSTUNREACH-没有到主机的路由,ftp,filezilla,proftpd,Ftp,Filezilla,Proftpd,我有一个FTP服务器,运行了大约一个月,没有任何问题 今天,我无法使用filezilla连接到它,我收到以下消息: 无法建立数据连接:EHOSTUNREACH-没有到主机的路由 我在Google/SO上搜索,发现可能是TLS问题。 但是,我可以使用控制台连接到FTP服务器: $ ftp ftp> open mymachine.mycompany.com Connected to mymachine.mycompany.com 220 Bienvenue sur le serveur FTP

我有一个FTP服务器,运行了大约一个月,没有任何问题

今天,我无法使用filezilla连接到它,我收到以下消息:

无法建立数据连接:EHOSTUNREACH-没有到主机的路由

我在Google/SO上搜索,发现可能是TLS问题。 但是,我可以使用控制台连接到FTP服务器:

$ ftp
ftp> open mymachine.mycompany.com
Connected to mymachine.mycompany.com
220 Bienvenue sur le serveur FTP mymachine.mycompany.com.
Name (mymachine.mycompany.com:adenoyelle): mylogin
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x    2 502      502         20480 Jun 05 11:51 Ga
drwxr-xr-x    7 502      502          4096 Apr 21 15:41 Bu
drwxr-xr-x    7 502      502          4096 Jun 03 16:26 Zo
226 Directory send OK.
ftp> 
原因是什么

编辑:我发现启用“主动”模式可以解决Filezilla中的问题,但我需要它在被动模式下工作

编辑:以下是Filezilla一侧的完整跟踪:

Status: Connecting to 10.196.***.***
Status: Connection established, waiting for welcome message...
Response:   220 Bienvenue sur le serveur FTP mymachine.mycompany.com.
Command:    USER mylogin
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:    UTF8
Response:   211 End
Command:    OPTS UTF8 ON
Response:   200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/mylogin"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode (10,196,165,224,189,253).
Command:    LIST
Error:  The data connection could not be established: EHOSTUNREACH - No route to host

这两者之间有一个区别,在命令行中使用
PORT
和Filezilla使用
PASV
更改所用连接的方向<代码>端口表示您的计算机打开一个端口并等待来自服务器的连接
PASV
表示服务器打开一个端口并等待客户端连接

服务器是否可能有防火墙阻止传入连接,可能是防火墙太笨,无法自动检测
PASV
结果并允许相应的端口。
可能它以前工作过,因为服务器选择的端口在防火墙允许的范围内。

对于PASV、PORT、Filezilla和vsftpd也有同样的问题。 连接成功,因此在Filezilla中不会返回活动模式


使用vsftpd、Filezilla和打开端口21/TCP上的默认配置,您需要切换到活动模式,它才能工作。

我在ubuntu 20 LTS上也遇到了同样的问题。问题与互联网服务提供(Airtel wifi)中的防火墙有关。当我通过USB连接我手机的互联网时,它工作得很好。
尝试更改internet连接,肯定会成功。

我会问我最喜欢的系统管理员午餐后是否更改了某些内容:)你最喜欢的系统管理员说什么,Arnaud?(我似乎也有同样的问题)