找回密码
 新建账号

FileZilla FTP Server FTP over TLS settings 设置FTP服务器证书启用FTPS

[复制链接]
php 发表于 2017/12/22 15:51 | 显示全部楼层 |阅读模式
FileZilla FTP Server FTP over TLS settings 设置FTP服务器证书,绑定TLS证书启用FTPS访问,还可以强制客户端使用FTPS加密协议访问FTP服务器禁止未加密连接。FileZilla FTP Server TLS Certificate证书可以去阿里云或者腾讯云等各种SSL证书倒卖机构购买,目前这些网站都有免费服务器HTTPS/FTPS证书,FTPS证书和HTTPS证书是通用且可以共用的, 关于SSL证书/TLS证书 SSL/TLS(RFC5246,Secure Socket Layer/Transport Layer Security)可以自行上Google百度一下,当然,如果只是自己玩玩FTP加密,可以使用FileZilla内置的Generate New Certificate... 按钮生成自签证书,唯一的区别是自签证书客户端是不认的,会出现证书错误的提示,出现提示后直接允许连接FTP服务器即可。
  • 将证书文件下载并保存到FileZilla FTP服务器所在的服务器电脑上
    假设D:\apps\server\TLS\wuxiancheng.cn\目录中存在certificate.crt和private.key两个文件,其中certificate.crt为保存服务器证书公钥的文件private.key为保存服务器证书私钥的文件
  • 运行FileZilla Server Interface.exe,依次进入Edit -> Settings -> FTP over TLS settings
  • 点击选中Enagel FTP over TLS support (FTPS) 如果只允许FTPS加密访问FTP服务器,还可以将Disallow plain unencrypted FTP选中
  • 将X.509 Certificate的Private key file设置为D:\apps\server\TLS\wuxiancheng.cn\private.key,将Certificate file设置为D:\apps\server\TLS\wuxiancheng.cn\certificate.crt **证书公钥和私钥可以保存到一个文件中去然后将两个配置项都设置为相同的路径
  • 还可以设置Explicit and implicit FTP over TLS.
    Allow explicit FTP over TLS (default: yes)
    Note: Explicit FTP over TLS shares the normal ftp port configured on the General settings page.
    Listen for implicit FTP over TLS on the following ports (default: 990)
    隐式FTPS认证相对FTPS显式认证更安全,显式FTPS使用General settings -> Connection settings -> Listen on these ports设置的FTP端口,隐式FTPS默认使用990端口,也可以指定为其他端口号。注意显式FTPS设置的端口号服务器会自动监听,但不能添加到General settings -> Connection settings -> Listen on these ports的FileZill Server监听端口列表中去,否则会报错Failed to bind the listen socket on port %d to the following IPs: ***
  • 将File transfer security中的两个项目选中确保文件传输安全
    These settings need to be enabled for file transfers to be secure.
    √Force PROT P to encrypt file transfers when using FTP over TLS.
    √Require TLS session resumption on data connection when using PROT P.
配置好FileZilla FTP服务器FTP over TLS (FTPS)后,还需要根据实际情况及FTP服务器支持情况在FTP客户端里面设置FTP连接类型
  • FTP
  • FTP over SSH
  • FTP using implicit SSL
  • FTP using implicit explicit SSL (Auth SSL)
  • FTP using implicit explicit SSL (Auth TLS)
如果服务器禁用了未加密连接,代表非加密传输的第一种连类型FTP将无法登录到FTP服务器,提示错误信息形如:530 This server does not allow plain FTP. You have to use FTP over TLS,如果服务器禁用了显式FTPS认证,而选择了以显式FTPS服务器认证登录会得到错误信息形如:502 Explicit TLS authentication not allowed.
以上为FlashFxp中的FTP连接类型,在FileZilla FTP Client中需要选择Protocol为FTP-File Transfer Protocol,然后选择Encryption,包括的选项有Use explicit FTP over TLS if available / Require explicit FTP over TLS / Require implicit FTP over TLS / Only use plain FTP (insecure)
不同的FTP客户端显示的内容不同,请自行参照选择,非英文版本请自行脑所用语言。
FTP服务器地址请填写TLS证书中的域名或IP,否则也会报错。
如果服务器上启用了防火墙,必须为FTP服务器使用的端口设置例外,如果使用被动模式连接FTP服务器,必须为FTP服务器程序设置例外,否则会出现无法连接的情况。

手机版|轻松E站

GMT+8, 2024/4/19 13:35

快速回复 返回顶部 返回列表