本文介绍了FTP处于被动模式:EHOSTUNREACH-主机无路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行了一个月左右的FTP服务器,没有任何问题.

I have a FTP server which was running for about a month without any problem.

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

Today, I cannot connect to it with filezilla, I get this message :

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

I searched on Google/SO and found that it might be a TLS problem.However, I can connect to the FTP server using the console :

$ 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中的问题,但我需要它在被动模式下工作

EDIT : I found that enabling the 'Active' mode solves the problem in Filezilla but I need it to work in passive mode

这是Filezilla方面的完整记录:

EDIT : Here is the full trace on Filezilla's side :

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

推荐答案

PASV和PORT以及Filezilla和vsftpd都存在相同的问题.连接成功,因此它不会退回到Filezilla中的活动"模式.

Had the same issue with PASV and PORT and Filezilla and vsftpd.The connection succeeds so it doesn't fall back on Active mode in Filezilla.

在vsftpd,Filezilla和端口21/TCP上都使用默认配置,您需要切换到活动"模式才能工作.

Using the default configuration on both vsftpd, Filezilla and opening port 21/TCP, you need to switch to Active mode for it to work.

这篇关于FTP处于被动模式:EHOSTUNREACH-主机无路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-12 08:19