免费注册 查看新帖 |

Chinaunix

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

[FTP] pureftpd+tls,失败? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-28 20:21 |只看该作者 |倒序浏览
internet上一台freebsd 6.0+pf
pureftpd安装一切都正常,用smartftp,passive和active都能正常登陆,使用,就是TLS不能登陆,错误信息是
代码:
220 You will be disconnected after 15 minutes of inactivity.
    AUTH TLS
234 AUTH TLS OK.
    Connected. Exchanging encryption keys...
    Server closed connection
    Cannot login waiting to retry (30s)...

然后就一直重试

内网一台同样的freebsd 6.0+pf,pureftpd+tls设置也一样,smartftp能正常登陆
代码:
    AUTH TLS
234 AUTH TLS OK.
    Connected. Exchanging encryption keys...
    Session Cipher: 128 bit RC4
    TLS encrypted session established.

论坛徽章:
0
2 [报告]
发表于 2005-12-29 13:53 |只看该作者
pureftpd的log里有什么信息?

论坛徽章:
0
3 [报告]
发表于 2005-12-29 14:07 |只看该作者
没有创建X.509证书,或者证书有问题

论坛徽章:
0
4 [报告]
发表于 2005-12-29 19:50 |只看该作者
log里面的信息和官方上的FAQ是一样的,但是也没有好的解决方案。

* TLS and error 00000000.

-> My TLS-enabled client doesn't work. It outputs something like :
"SSL connect: error:00000000:lib(0):func(0):reason(0)". What does it mean?

This error is not very explicit. You get it from some Unix clients like LFTP.
It actually means that there is a firewall or a NAT box between a TLS-enabled
server and a TLS-enabled client, but that firewall is unable to handle
encrypted FTP sessions. Unfortunately, there's no simple workaround against
this. Try to switch your client to active mode and use 1:1 NAT, but SSL/TLS,
firewalls and FTP don't mix very well.

论坛徽章:
0
5 [报告]
发表于 2005-12-30 10:56 |只看该作者
原帖由 norman_lu 于 2005-12-29 19:50 发表
log里面的信息和官方上的FAQ是一样的,但是也没有好的解决方案。

* TLS and error 00000000.

-> My TLS-enabled client doesn't work. It outputs something like :
"SSL connect: error:00000000 ...

和你的情况不同,你在TLS的协商阶段就出问题,肯定证书有问题。FAQ说的是TLS Encryption通道建立后,FTP的PASV或PORT命令出问题的情况。

如果FAQ指的是TLS连接和协商阶段,那肯定是Pureftp的开发人员在扯淡。感觉Pureftp的开发人员不怎么懂SSL协议,连FTP数据传输的SSL,TLS加密,这么基本的功能都不提供。Pureftp的SSL纯粹是漏勺,只是FTP控制链路加密了。

[ 本帖最后由 cxu123 于 2005-12-30 11:01 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2005-12-30 11:53 |只看该作者
证书肯定没问题,因为把这个证书放到内网的这个机器,或者把内网机器的证书拷到internet机器上,都做过试验了。试验的结果就是,内网始终都是可以,internet始终都不行,错误信息就是"SSL connect: error:00000000:lib(0):func(0):reason(0)"。
还有,我不觉得pureftpd不支持数据加密传输有什么不好,我需要的只是在帐户验证过程中的加密,对于数据传输,我要的是速度,因为没有什么机密的数据,对我来说,已经足够了。

论坛徽章:
0
7 [报告]
发表于 2005-12-30 14:22 |只看该作者
It actually means that there is a firewall or a NAT box between a TLS-enabled
server and a TLS-enabled client, but that firewall is unable to handle
encrypted FTP sessions.

这句没有用处吗?

论坛徽章:
0
8 [报告]
发表于 2005-12-30 15:59 |只看该作者
原帖由 wolfg 于 2005-12-30 14:22 发表
It actually means that there is a firewall or a NAT box between a TLS-enabled
server and a TLS-enabled client, but that firewall is unable to handle
encrypted FTP sessions.
...

检查过pf了,没找到有解决方案。因为passive和active模式工作都正常,也就是该开的端口都开了,不知道pf还有什么可以设置的。

论坛徽章:
0
9 [报告]
发表于 2005-12-30 16:06 |只看该作者

论坛徽章:
0
10 [报告]
发表于 2005-12-31 09:59 |只看该作者
明显是SSL handshake的问题。

第一件事情是升级服务器的Openssl到最新版本,用FlashFXP的TLS试验,FlashFXP也是用Openssl。

如果不能连,可以用Vsftpd的TLS试验一下,感觉vsftpd的代码质量好过pureftpd。

如果防火墙在中间捣乱,Stateful的防火墙,对FTP可能只Parse 21端口。如果可能,将服务器端口不用21,试验一次。或将服务器放到DMZ里
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP