3

I know that per default FTP is insecure, because it is not encrypted. To avoid this insecure behavior of FTP, I want to set up a TLS encryption in my ProFTPD. Pursuant to this tutorial here: https://www.howtoforge.com/tutorial/install-proftpd-with-tls-on-ubuntu-16-04/ the tls configuration in ProFTPD should look like this:

 <IfModule mod_tls.c>
TLSEngine                  on
TLSLog                     /var/log/proftpd/tls.log
TLSProtocol TLSv1.2
TLSCipherSuite AES128+EECDH:AES128+EDH
TLSOptions                 NoCertRequest AllowClientRenegotiations
TLSRSACertificateFile      /etc/proftpd/ssl/proftpd.cert.pem
TLSRSACertificateKeyFile   /etc/proftpd/ssl/proftpd.key.pem
TLSVerifyClient            off
TLSRequired                on
RequireValidShell          no
</IfModule>

A lot of these directives are self-explanatory, but I still do not know what the directive "TLSVerifyClient" means.

According to the ProFTPD manual:

If off, the module will accept the certificate and establish an SSL/TLS session, but will not verify the certificate.

If on, the module will verify a client's certificate and, furthermore, will fail all SSL handshake attempts unless the client presents a certificate when the server requests one.

But I thought the certificate is coming from the server itself, so why should the server accepts certificate requests from the client?

and my second question, what is the meaning of the "nocertrequest" option of the TLSoption directive?

Conforming to the ProFTPD manual, the function of this option is:

Some FTP clients are known to be buggy when handling a server's certificate request. This option causes the server not to include such a request during an SSL handsh

Here the same question, why would the server send a certificate request to the client, when the server itself have TLS-certificates.

Wubi
  • 83
  • 9

2 Answers2

3

For a more secure protocol, you might consider using SFTP (which proftpd supports). SFTP runs over SSH, so fully encrypted. You might find this related question useful. This tutorial on configuring proftpd to use SFTP may also help.

  • Thank you for your answer. As I wrote in my question I set up FTPS on my ProFTPD server and FTPS is also fully encrypted. So I think this should be sufficient for a secure connection. – Wubi Apr 10 '17 at 05:52
2

The TLSVerifyClient directive is about authenticating clients (i.e. "client auth" or "mutual auth"); it is used to determine whether mod_tls will request a certificate from the client, and whether that client-provided certificate must be valid (TLSVerifyClient on), or not (TLSVerifyClient optional). Some sites want to use a client-provided certificate for access control; only clients presenting a certificate from a CA trusted by the server would be allowed, for example.

The original implementation of mod_tls would always include a request for the client's certificate, regardless of the TLSVerifyClient setting. Thus there was the "NoCertRequest" TLSOption, for disabling that client certificate request. Now, however, the NoCertRequest TLSOption has been deprecated in favor of using only the TLSVerifyClient setting; see Bug#4213.

Hope this helps!

Castaglia
  • 3,239
  • 3
  • 19
  • 40
  • Thank you really much for your answer. So when i understand you right, the "TLSVerifyClient" is not intended to establish a secure TLS connection, is was designed for client authentication, so that the server could accept the certificate like as a key file. And when I only need a secure TLS connection, I do not need this directive. – Wubi Feb 20 '17 at 06:18
  • It is intended for client authentication, yes. Some folks would consider that client authentication as part of a "secure TLS connection", so the wording you use may or may not be universally agreed upon. But for purposes of protecting the client/server control and data connections using TLS, the `TLSVerifyClient` directive is not _required_; it is used to set additional _policy_ constraints on the authentication. – Castaglia Feb 20 '17 at 06:20
  • Thank you for your response. Client authentication over TLS is not needed for my purpose. To authenticate the clients, I have a MySQL database. You say, that the original implementation of mod_tls always includes a certificate request. Does the current implementation also always include a certificate request? – Wubi Feb 20 '17 at 06:33
  • Depends on what you mean by "current implementation". Per the [Bug#4123](http://bugs.proftpd.org/show_bug.cgi?id=4213) link I mentioned, if you are using ProFTPD 1.3.6rc2 or later, then `mod_tls` does _not_ automatically request a certificate from the client. – Castaglia Feb 20 '17 at 06:34
  • I am using version 1.3.5 of ProFTPD. – Wubi Feb 20 '17 at 06:42
  • So when I set no TLSVerifyClient and no "NoCertRequest" in ProFTPD version 1.3.5. there are also no client authentication? – Wubi Feb 20 '17 at 17:09
  • 1
    In that situation, there would be no client authentication _using certificates_. There is still authentication via username/password, of course. – Castaglia Feb 20 '17 at 17:32