ASIX/M08/UF1/P41/211
Salta a la navegació
Salta a la cerca
Instal·lem:
yum -y install pure-ftpd
Habilitem arrencada automàtica i engeguem:
systemctl enable pure-ftpd.service systemctl start pure-ftpd.service
Suport FTPS (FTP+SSL)
Instal·larem OpenSSL en cas de no estar instal·lat:
yum install openssl
Editarem l'arxiu /etc/pure-ftpd/pure-ftpd.conf per permetre que PureFTP pugui aprofitar els avantatges de SSL per a oferir una protecció al protocol FTP. Descomentarem la línia següent de manera que quedi així:
TLS 1 #El valor 1 significa que es permetran connexions tant xifrades com sense xifrar. Altres valors serien més restrictius: obligar a usar TLS o bé prohibir-lo totalment; per exemple
Per a usar SSL/TLS haurem de crear certificats:
mkdir -p /etc/ssl/private/ [root@ispconfig ~]# openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem Generating a 2048 bit RSA private key .................................................................+++ .........+++ writing new private key to '/etc/ssl/private/pure-ftpd.pem' ----- 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]:ES State or Province Name (full name) []: Locality Name (eg, city) [Default City]:Tona Organization Name (eg, company) [Default Company Ltd]:GSB Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []:ispconfig.local Email Address []:guillem_solaboeck@iescarlesvallbona.cat [root@ispconfig ~]# chmod 600 /etc/ssl/private/pure-ftpd.pem [root@ispconfig ~]# openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 2048 Generating DH parameters, 2048 bit long safe prime, generator 2 This is going to take a long time .......................................................+........................................................................................+.............+........................................................................................+..........................................................................+........................+............................................................................................................ (...) ...............................................+..........+............................................................................................................................+.....................................................................+..........+............+.........................................................++*++*
Finalment, reiniciem el servidor FTP perquè recarregui el certificat TLS generat i pugui fer-lo servir en les comunicacions que ho demanin:
[root@ispconfig ~]# systemctl restart pure-ftpd.service