Debian 13 trixie

FTP : ProFTPD Over SSL/TLS2025/09/15

 

Configure ProFTPD to use SSL/TLS.

[1] Create self-signed certificates.
However. if you use valid certificates like from Let's Encrypt or others, you don't need to create this one.
root@www:~#
cd /etc/ssl/private

root@www:/etc/ssl/private#
openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp384r1) -keyout proftpd.pem -out proftpd.pem -days 3650

-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:JP                                    # country code
State or Province Name (full name) []:Hiroshima                         # State
Locality Name (eg, city) [Default City]:Hiroshima                       # city
Organization Name (eg, company) [Default Company Ltd]:GTS               # company
Organizational Unit Name (eg, section) []:Server World                  # department
Common Name (eg, your name or your server's hostname) []:www.srv.world  # server's FQDN
Email Address []:root@srv.world                                         # admin's email

root@www:/etc/ssl/private#
ll proftpd.pem

-rw------- 1 root root 1307 Sep 15 09:49 proftpd.pem
[2] Configure ProFTPD.
root@www:~#
apt -y install proftpd-mod-crypto
root@www:~#
vi /etc/proftpd/modules.conf
# line 26 : uncomment

LoadModule mod_tls.c
root@www:~#
vi /etc/proftpd/proftpd.conf
# line 143 : uncomment

Include /etc/proftpd/tls.conf
root@www:~#
vi /etc/proftpd/tls.conf
# line 10-12 : uncomment and change

TLSEngine               on
TLSLog                  /var/log/proftpd/tls.log
TLSProtocol             TLSv1.3

# line 27, 28 : uncomment and specify your certificate

TLSRSACertificateFile                   /etc/ssl/private/proftpd.pem
TLSRSACertificateKeyFile                /etc/ssl/private/proftpd.pem

root@www:~#
systemctl restart proftpd

FTP Client : Debian

 

Configure FTP Client to use FTPS connection.

[3] Install FTP Client on Debian and configure like follows.
debian@client:~$
vi ~/.lftprc
# create new

set ftp:ssl-auth TLS
set ftp:ssl-force true
set ftp:ssl-protect-list yes
set ftp:ssl-protect-data yes
set ftp:ssl-protect-fxp yes
set ssl:verify-certificate no
debian@client:~$
lftp -u debian www.srv.world

Password:
lftp debian@www.srv.world:~>

FTP Client : Windows

[4] For example of FileZilla on Windows, Open [File] - [Site Manager].
[5] Input connection information like follows, and for encryption field, select [Require explicit FTP over TLS].
[6] If you set self-signed certificate, following warning is shown, it's no problem. Go next.
[7] If settings are OK, it's possible to connect to FTP server with FTPS like follows.
Matched Content