From 556b052c3ce077b2f148ae9536c2ead7814e0fcb Mon Sep 17 00:00:00 2001 From: btatu Date: Fri, 15 May 2020 12:09:08 +0200 Subject: [PATCH] =?UTF-8?q?Proc=C3=A9dure=20pour=20activer=20le=20FTPS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HowtoProFTPD.md | 63 +++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/HowtoProFTPD.md b/HowtoProFTPD.md index c9b7f2ab..091b66d6 100644 --- a/HowtoProFTPD.md +++ b/HowtoProFTPD.md @@ -336,42 +336,43 @@ Ou même effacer toutes les données de quota d'un utilisateur : ## FTPS -On peut configurer FTP over SSL/TLS ainsi : +On peut activer SSL/TLS en editant le fichier suivant pour y activer ces directives : ~~~ -LoadModule mod_tls.c - - +# vim /etc/proftpd/tls.conf +~~~ +~~~ TLSEngine on -TLSLog /var/log/proftpd/ftps.log -TLSProtocol TLSv1 - -TLSRSACertificateFile /etc/ssl/certs/ftp.example.com.crt -TLSRSACertificateKeyFile /etc/ssl/private/ftp.example.com.key -TLSCACertificateFile /etc/ssl/certs/ftp.example.com_ca.pem - -#TLSOptions AllowClientRenegotiations - -TLSOptions AllowPerUser -TLSVerifyClient off - -TLSVerifyClient on - - -TLSRequired off - -TLSRenegotiate required off -TLSOptions NoSessionReuseRequired - -RequireValidShell off -Port 990 -AuthUserFile /etc/proftpd/vpasswd -DefaultRoot ~ - -PassivePorts 61000 62000 - +TLSLog /var/log/proftpd/tls.log +TLSProtocol SSLv23 +TLSRSACertificateFile /etc/proftpd/ssl/proftpd.crt +TLSCACertificateFile /etc/proftpd/ssl/proftpd.ca.crt +TLSRSACertificateKeyFile /etc/proftpd/ssl/proftpd.key ~~~ +Il y aura besoin de renseigner les bon certificats et clé privé et il faudra vérifier que le fichier est bien chargé par la configuration principale. Sinon ajouter cette directive : + +~~~ +# vim /etc/proftpd/proftpd.conf +~~~ +~~~ +Include /etc/proftpd/tls.conf +~~~ + +Recharger le service et vérifiez que ça fonctionne bien : + +~~~ +# systemctl restart proftpd.service +~~~ +~~~ +$ lftp domaine.com +lftp domaine.com:~> set ftp:ssl-force true +lftp domaine.com:~> login utilisateur +Mot de passe : +lftp utilisateur@domaine.com:~> ls +~~~ + +Si l'on peut lire le contenu du dossier, alors c'est fonctionnel. ## SFTP