免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2598 | 回复: 2
打印 上一主题 下一主题

[FTP] Pureftpd 利用被动TLS=2模式传输的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-29 17:20 |只看该作者 |倒序浏览
说明一下我遇到的问题:
建了一台pureftpd 的服务器,监听端口绑定在4321,数据传输端口为4320,被动传输模式,TLS方式为2。
服务器前端有个防火墙,4321和4320端口已经打开,相关的证书已经生成好放到相应的位置。
对应pureftpd.conf的内容:

ForcePassiveIP              SERVER_IP
PassivePortRange         4320 4320
Bind                               SERVER_IP,4321
TLS                                2

进行测试,测试结果:
1)用普通的FTP主动和被动模式连接4321端口传输完全没有问题。
2)但是安全需要,我们需要在FileZilla客户端用被动的FTP over TLS (explicit encryption) 这种模式来建立连接,这种连接模式在测试中没有通过。

在客户端失败的结果是:

Status:        Connecting to xberndftp.ext.nokia.com:4321 ...
Status:        Connected with xberndftp.ext.nokia.com:4321, negotiating SSL connection...
Response:        220---------- Welcome to Pure-FTPd [TLS] ----------
Response:        220-<<
。。。。。。。。。。。。。。。。>>
Response:        220-Local time is now 10:53. Server port: 4321.
Response:        220-This is a private system - No anonymous login
Response:        220 You will be disconnected after 15 minutes of inactivity.
Command:        AUTH TLS                                                                          
Response:        234 AUTH TLS OK.                                  认证部分通过(说明4321端口连接成功)       
Error:        Disconnected from server                                          但是无法建立连接 (4320端口无法建立连接)
Error:        Unable to connect!

我参阅了一下我pureftpd服务器的常见问题,其中有一个和我遇到的非常相像:

问题:My client is behind a stateful firewall doing applicative filtering (like IPTables with ip_conntrack_ftp or
ip_nat_ftp) . Connections to an SSL/TLS enabled server does't work. Authentication works, but I'm unable
to download files nor list directories.
答案:First, try to force your client to use the passive mode. In active mode, the server has to connect to the client
(or the NAT gateway) on a dynamic port that is negociated on the connection socket. But when SSL/TLS is
used, that connection socket is encrypted, therefore no man-in-the middle can see what ports will be used to
transfer data, including the firewall. There are some proposals to work around this problem, but neither
popular clients nor common firewalls are aware of these tricks. Therefore, use the passive mode or switch to
SSH.
我已经使用了FTP over TLS 被动模式连接方式。但是结果还是无法连接。

希望大家帮助我排除一下错误,非常感谢。

论坛徽章:
0
2 [报告]
发表于 2006-09-06 10:15 |只看该作者
服务器端有什么log没有?现在的信息不太好分析

论坛徽章:
0
3 [报告]
发表于 2006-09-12 00:03 |只看该作者
解决了,是前端防火墙的问题:
4321端口的设定为传统ftp的模式,但是加密过(TLS)后的传输信息防火墙已经无法识别,所以无法连接成功.

我后来让防火墙的同事把防火墙改为透明的服务即可
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP