ProFTPD is a powerful and highly configurable FTP server. In this tutorial, you will learn how to install and configure ProFTPD with TLS/SSL encryption on Ubuntu 22.04, ensuring that all file transfers are secured.
What You Can Do with ProFTPD:
- Secure File Transfers: Encrypt FTP connections using TLS/SSL for secure data transfer.
- User Management: Manage FTP users and set specific permissions for each.
- Advanced Configuration: Easily configure ProFTPD to suit your server’s needs, including IPv6 support.
Step 1: Set Up a Cloud Instance
Before we begin the installation process, you’ll need a cloud instance where the FTP server will run. Follow these steps to create one:
Step 1.1: Access Your Provider’s Dashboard
- Log into your hosting provider’s control panel and find the option to create a new instance or server.
Step 1.2: Select Data Center Location
- Choose the data center location that is geographically closest to your users or target audience for optimal performance.
Step 1.3: Configure the Server Plan and Operating System
- Pick the server plan that meets your needs in terms of CPU, memory, and storage.
- Select Ubuntu 22.04 as the operating system for the instance.
Step 1.4: Finalize the Instance Creation
- Provide the necessary details like hostname and authentication method (SSH keys or password), then initiate the creation of your instance.
Step 1.5: Locate Your Instance’s IP Address
- After the instance is created, retrieve the public IP address from the instance’s details. This will be needed to connect remotely and configure the server.
Connecting to Your Instance
Once your instance is created, you can connect to it remotely using SSH. Follow the steps below:
- Open a Terminal (on Linux or macOS) or use an SSH client like PuTTY (on Windows).
- Use the following SSH command to connect to your instance. Replace
<your-server-ip>
with the public IP address of your instance anduser
with the appropriate username (usuallyroot
orubuntu
):
ssh user@<your-server-ip>
- If using SSH keys for authentication, ensure that the SSH key pair you used during the instance creation process is available on your local machine, and specify the private key using the
-i
option:
ssh -i /path/to/private-key user@<your-server-ip>
- For password-based authentication, enter the password for the user account when prompted.
Once connected, you can begin setting up your server by following the rest of the steps in the tutorial.
Step 2: Update Your System
Before proceeding, update your system to ensure you have the latest packages installed:
apt update -y && apt upgrade -y
Step 3: Install ProFTPD
Install ProFTPD with the following command:
apt install proftpd -y
After installation, start ProFTPD and verify that it’s running:
systemctl start proftpd
systemctl status proftpd
Check the installed version of ProFTPD:
proftpd --version
Step 4: Create an FTP User
To allow users to connect to the FTP server, create a new user:
adduser ftpuser
Follow the prompts to set up a password and configure the user.
Step 5: Enable TLS/SSL for ProFTPD
5.1: Install OpenSSL
To enable TLS/SSL encryption, install OpenSSL:
apt-get install openssl -y
5.2: Generate SSL Certificates
Use OpenSSL to generate an SSL certificate and private key for ProFTPD:
openssl req -x509 -newkey rsa:2048 -sha256 -keyout /etc/ssl/private/proftpd.key -out /etc/ssl/certs/proftpd.crt -nodes -days 365
Set the correct permissions for the private key and certificate:
chmod 600 /etc/ssl/private/proftpd.key
chmod 600 /etc/ssl/certs/proftpd.crt
Step 6: Configure ProFTPD
6.1: Edit the Main ProFTPD Configuration
Open the ProFTPD configuration file:
nano /etc/proftpd/proftpd.conf
Make the following changes to enable IPv6 support, configure the server name, and include the TLS configuration:
UseIPv6 on
ServerName "FTP Server"
Port 21
RequireValidShell on
AuthOrder mod_auth_pam.c* mod_auth_unix.c
Include /etc/proftpd/tls.conf
Save the file and close the editor.
Step 7: Configure TLS for ProFTPD
7.1: Edit the TLS Configuration File
Open the TLS configuration file for ProFTPD:
nano /etc/proftpd/tls.conf
Add the following configuration to enable TLS/SSL encryption:
TLSEngine on
TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv23
TLSRequired on
This configuration ensures that ProFTPD uses the SSL certificate you generated earlier and logs all TLS-related activity.
Step 8: Restart ProFTPD
After configuring ProFTPD, restart the service to apply the changes:
systemctl restart proftpd
Step 9: Verify FTP Server with TLS/SSL
To verify that the FTP server is running with TLS/SSL, you can connect to it using an FTP client (such as FileZilla) that supports secure connections. Use the IP address of your server, the username (ftpuser
), and the password you set when creating the user.
In your FTP client, ensure that you select Require explicit FTP over TLS to secure the connection.
You have successfully installed and configured ProFTPD with TLS/SSL on Ubuntu 22.04. Your FTP server is now secured with encryption, ensuring that all file transfers are protected.
To host a secure FTP server like ProFTPD efficiently, Shape.Host offers Linux SSD VPS services. Shape.Host’s SSD-powered VPS ensures fast and reliable performance, perfect for hosting secure file transfer services.