ISPConfig comes with LetsEncrypt integrated in its panel for web domains. However, it does not automatically use the SSL cert for FTP service (PureFTP).
This post describes the steps to enable the support.
1. We need an FQDN so that Lets Encrypt (LE) will be able to generate SSL under ISPConfig panel.
2. PureFTP TLS support requires a cert in .pem format which can be generated by leveraging the LE cert generated:
cat /etc/letsencrypt/live/mydomain.com/privkey.pem /etc/letsencrypt/live/mydomain.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem
3. Restart PureFTP so that it will not use the new certificate
4. LE certificates need to be renewed regularly so it is necessary to create a cron job to keep the .pem file updated.
Setup a crontab
0 6 * * * /etc/letsencrypt/certbot-auto -n renew --quiet --no-self-upgrade && cat /etc/letsencrypt/live/mydomain.com/privkey.pem /etc/letsencrypt/live/mydomain.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem && service pure-ftpd-mysql restart
This post describes the steps to enable the support.
1. We need an FQDN so that Lets Encrypt (LE) will be able to generate SSL under ISPConfig panel.
2. PureFTP TLS support requires a cert in .pem format which can be generated by leveraging the LE cert generated:
cat /etc/letsencrypt/live/mydomain.com/privkey.pem /etc/letsencrypt/live/mydomain.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem
3. Restart PureFTP so that it will not use the new certificate
4. LE certificates need to be renewed regularly so it is necessary to create a cron job to keep the .pem file updated.
Setup a crontab
0 6 * * * /etc/letsencrypt/certbot-auto -n renew --quiet --no-self-upgrade && cat /etc/letsencrypt/live/mydomain.com/privkey.pem /etc/letsencrypt/live/mydomain.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem && service pure-ftpd-mysql restart
5. If ISPConfig is configured properly, LE will be renewed regularly so the cron job can be simpler:
0 6 * * * cat /etc/letsencrypt/live/mydomain.com/privkey.pem /etc/letsencrypt/live/mydomain.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem && service pure-ftpd-mysql restart
This is tested under Ubuntu 16.04.5LTS / PureFTP / ISPConfig 3.1.13 following a perfect server setup.
Comments
Post a Comment