Note: This tutorial is also available in German (Diese Anleitung ist auch in deutscher Sprache verfügbar)
If you like, you can make secure FTP connections for all users
QuoteDisplay MoreFiles to edit:
- Firewall (I use /etc/arno-iptables-firewall/debconf.cfg)
- /etc/proftpd/proftpd.conf
Level: Easy
[size=medium]Certificate[/size]
- You need a valid certificate, from CAcert.org or a any authority
- You need the certificate file and the private key. Do this on a save place (e.g. /etc/ssl)
[size=medium]ProFTP[/size]
Open:
[size=medium]Configure ports[/size]
Find
Replace with
[size=medium]Configure TLS[/size]
Find
Code
- #<IfModule mod_tls.c># TLSEngine on # on for use of TLS# TLSRequired off # require encription on channel data# TLSLog /var/log/proftpd/ftp_ssl.log # where to log to# TLSProtocol SSLv23 # SSLv23 or TLSv1# TLSOptions NoCertRequest NoSessionReuseRequired # either to request the certificate or not# TLSRSACertificateFile /etc/imscp/CERTIFIACE.pem # SSL certfile# TLSRSACertificateKeyFile /etc/imscp/CERTIFIACE.pem # SSL keyfile# TLSVerifyClient off # client verification#</IfModule>
Remove all
Example
Code
- <IfModule mod_tls.c> TLSEngine on # on for use of TLS TLSRequired off # require encription on channel data TLSLog /var/log/proftpd/ftp_ssl.log # where to log to TLSProtocol SSLv23 # SSLv23 or TLSv1 TLSOptions NoCertRequest NoSessionReuseRequired # either to request the certificate or not TLSRSACertificateFile /etc/imscp/YOUR_CERT_FILE.pem # SSL certfile TLSRSACertificateKeyFile /etc/imscp/YOUR_CERT_FILE.pem # SSL keyfile TLSVerifyClient off # client verification</IfModule>
At TLSRSACertificateFile and TLSRSACertificateKeyFile you must enter new path to files.
Note: your certificate can also have the extension .crt and .key.
[size=medium]To disable insecure connections in future:[/size]
Find
Replace with
Note: No insecure connections are possible.
[size=medium]Configure firewall port[/size]
If you have a firewall, you must configure the passive port range (e.g. 49152 65534)
Note: the ports must be free. You can also use a port range from 49152 49999. This must be in both config files.)
Example for arno-iptables-firewall:
Open
Find
Note: It's possible that you have any ports in this line, insert the new values in the line.
Insert on a free place between
Example:
Save all files.
Restart services
[size=medium]Client connection with FileZilla or similar clients[/size]
Example:
Host: IP or Your-Domain.tld
Port: 21
Protocol: FTP - File Transfer Protocol
Encryption: Require explicit FTP over TLS
Have fun with your secured FTP connection