squid 和 ftp 连接

squid 和 ftp 连接

我有一个用于 http 和 ftp 连接的 squid 代理服务器,我试图使用 filezilla 打开 ftp,但总是失败并显示以下错误:

Status: Connection with proxy established, performing handshake...
Response:   Proxy reply: HTTP/1.0 403 Forbidden
Error:  Proxy handshake failed: ECONNRESET - Connection reset by peer
Error:  Connection timed out
Error:  Failed to retrieve directory listing

我嗅探了流量,发现 filezilla 正在尝试连接到不同的端口,但代理拒绝了它,这是嗅探结果的一部分

CONNECT 201.150.36.227:61179 HTTP/1.1
Host: 201.150.36.227:61179
User-Agent: FileZilla

每次都是不同的端口,所以,我没办法在 squid 中允许它,另外,我将 filezilla 设置为使用主动连接,结果相同,被动连接,再次产生相同的结果,所以,我没办法了,我需要你的帮助,也许在 filezilla 或 squid 中的设置可以完成这项工作,所以,请帮忙

这是 filezilla 的完整日志

    Status: Connecting to uhma.mx through proxy
Status: Connecting to 172.19.216.13:3128...
Status: Connection with proxy established, performing handshake...
Response:   Proxy reply: HTTP/1.0 200 Connection established
Status: Connection established, waiting for welcome message...
Response:   220 ProFTPD 1.3.3a Server (a3 FTP CUATRO) [201.150.36.227]
Command:    USER uhmamx
Response:   331 Password required for uhmamx
Command:    PASS *******
Response:   230 User uhmamx logged in
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is the current directory
Command:    TYPE I
Response:   200 Type set to I
Command:    PASV
Response:   227 Entering Passive Mode (201,150,36,227,238,251).
Command:    MLSD
Status: Connecting to 172.19.216.13:3128...
Status: Connection with proxy established, performing handshake...
Response:   Proxy reply: HTTP/1.0 403 Forbidden
Error:  Proxy handshake failed: ECONNRESET - Connection reset by peer
Error:  Connection timed out
Error:  Failed to retrieve directory listing

答案1

我在 squid.conf 中添加了一个端口范围,并配置了 filezilla 来限制它将要使用的端口范围

acl SSL_ports port 50000-50010

现在,它运行良好。

谢谢

相关内容