博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
FTP Server setup with TLS (Transport Layer Security) on Debian
阅读量:2435 次
发布时间:2019-05-10

本文共 3448 字,大约阅读时间需要 11 分钟。

ProFTPD is a written for use on
and Unix-a-like operating systems, there is no support for native use under Microsoft Windows.

The TLS protocol allows applications to communicate across a

in a way designed to prevent eavesdropping, tampering, and message forgery. TLS provides endpoint authentication and
privacy over the Internet using cryptography. Typically, only the server is authenticated (i.e., its identity is ensured) while the client remains unauthenticated.

FTP is a very insecure protocol because all passwords and all data are transferred in clear text. By using TLS, the whole communication can be encrypted, thus making FTP much more secure. This article explains how to set up ProFTPd with TLS on a Debian Etch server.

Install ProFTPd And OpenSSL

#apt-get install proftpd openssl

You will be asked a question:

Run proftpd from inetd or standalone? <-- standalone

This will complete the installation.

Configuring proftpd

Now you need to open /etc/proftpd/proftpd.conf and change UseIPv6 from on to off; otherwise you’ll get a warning like this when you start ProFTPd

#vi /etc/proftpd/proftpd.conf

UseIPv6 off

For security reasons you can add the following lines to /etc/proftpd.conf

DefaultRoot ~

IdentLookups off
ServerIdent on “”

and restart Proftpd using the following command

#/etc/init.d/proftpd restart

Creating The SSL Certificate For TLS

In order to use TLS, we must create an SSL certificate. I create it in /etc/proftpd/ssl, therefore I create that directory first:

#mkdir /etc/proftpd/ssl

Afterwards, we can generate the SSL certificate as follows:

#openssl req -new -x509 -days 365 -nodes -out /etc/proftpd/ssl/proftpd.cert.pem -keyout /etc/proftpd/ssl/proftpd.key.pem

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "GB").

State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name.

Locality Name (eg, city) []: <-- Enter your City.

Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter your Organization Name (e.g., the name of your company).

Organizational Unit Name (eg, section) []: <-- Enter your Organizational Unit Name (e.g. "IT Department").

Common Name (eg, YOUR name) []: <-- Enter the Fully Qualified Domain Name of the system (e.g. "test.example.com").

Email Address []: <-- Enter your Email Address.

Enabling TLS In ProFTPd

In order to enable TLS in ProFTPd, open /etc/proftpd/proftpd.conf and find the section beginning with

<IfModule mod_tls.c>

vi /etc/proftpd/proftpd.conf

It should look like this:

<IfModule mod_tls.c>

TLSEngine off
</IfModule>

Modify it as follows

<IfModule mod_tls.c>

TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv23
TLSOptions NoCertRequest
TLSRSACertificateFile /etc/proftpd/ssl/proftpd.cert.pem
TLSRSACertificateKeyFile /etc/proftpd/ssl/proftpd.key.pem
TLSVerifyClient off
TLSRequired on
</IfModule>

If you use TLSRequired on, then only TLS connections are allowed (this locks out any users with old that don’t have TLS support); by commenting out that line or using TLSRequired off both TLS and non-TLS connections are allowed, depending on what the FTP client supports.

Restart ProFTPd using the following command

/etc/init.d/proftpd restart

That’s it. You can now try to using your FTP client; however, you should configure your FTP client to use TLS (this is a must if you use TLSRequired on).

If you’re having problems with TLS, you can take a look at the TLS log file /var/log/proftpd/tls.log.

转载地址:http://odmmb.baihongyu.com/

你可能感兴趣的文章
在LINUX中安装WEB SPHERE5.1的正确方法
查看>>
WebSphere简单故障排查
查看>>
ITCAM for Websphere v6.0与ITM v6.1集成的快速指南
查看>>
数据泵 TTS(传输表空间技术)
查看>>
weblogic管理2 - 创建并启动一个managed server
查看>>
linux下开机自动开启单机oracle
查看>>
weblogic管理1——创建 和 删除一个domain
查看>>
SQL开发--经典建议(转载)和大家分享
查看>>
网络上经典的DOS小命令(转)
查看>>
sqlserver中的一些技巧(转)
查看>>
简化Windows 2003域控制器密码(转)
查看>>
GSM无线网络的虚拟分层(转)
查看>>
不用重装 轻松解决Windows系统棘手问题(转)
查看>>
对移动通信网络优化工作的一些见解(转)
查看>>
正确网络配置建议 减少卡机死机的关键(转)
查看>>
智能手机Smartphone开发从零起步(五)(转)
查看>>
SEO技巧中你可能没有注意的细节(转)
查看>>
微软开始二代Windows Live 不见Cloud OS踪影
查看>>
创建ISAPI扩展(转)
查看>>
病毒及木马预警一周播报(06.04.17~04.23)(转)
查看>>