Proftpd mit TLS/SSL

Aus Root-Wiki
Wechseln zu: Navigation, Suche

Installation von proftpd

Da vielleicht nicht alle proftpd schon installiert habe, erkläre ich noch mal kurz wie es geht.

apt-get update & apt-get install proftpd


Wenn er fragt, wie proftpd ausgeführt werden soll, dann wähl einfach standalone aus.

Run proftpd from inetd or standalone? <-- standalone

Das war's schon. :)

Installation von openssl

OpenSSL wird von TLS benötigt, deswegen einfach ausführen.

apt-get update & apt-get install openssl


proftpd.conf anpassen

Aus Sicherheitsgründen würde ich noch folgende Sachen ändern/hinzufügen:

DefaultRoot ~
IdentLookups off
ServerIdent on "FTP Server ready."

Erstellen der SSL Zertifikate für TLS

Um TLS zu verwenden, müssen wir ein SSL Zertifikat erstellen. Diese erstellen wir einfach im /etc Ordner.

openssl req -new -x509 -days 365 -nodes -out /etc/proftpd.cert.pem -keyout /etc/proftpd.key.pem
Country Name (2 letter code) [AU]: (in den meisten Fällen "DE")
State or Province Name (full name) [Some-State]: (Bundesland oder Region, z.B. NRW)
Locality Name (eg, city) []: (deine Stadt)
Organization Name (eg, company) [Internet Widgits Pty Ltd]: (Name von deiner Firma/Projekt)
Organizational Unit Name (eg, section) []: (Abteilung, z.B. "FTP-Server")
Common Name (eg, YOUR name) []: (Domain Namen, z.B. fast-srv.de)
Email Address []: (deine E-Mail Adresse)

TLS in ProFTPd freischalten

nano /etc/proftpd.conf

Folgendes fügen wir hinzu bzw. ändern es:

<IfModule mod_tls.c>
       TLSEngine                  on
       TLSLog                     /var/log/proftpd-tls.log
       TLSRSACertificateFile      /etc/proftpd.cert.pem
       TLSRSACertificateKeyFile   /etc/proftpd.key.pem
       TLSVerifyClient            off
       TLSRequired                off
</IfModule>

Fertig

Das war es schon. proftpd noch neu starten und dann sollte es gehen.

/etc/init.d/proftpd restart