Setup Secure FTP File Transfer Using SSL/TLS in RHEL 8

In our last article, we have described in detail on how to install and configure an FTP server in RHEL 8 Linux. In this article, we will explain how to secure an FTP server using SSL/TLS to enable data encryption services for secure file transfer between systems.

We hope you already have an FTP server installed and running properly. If not, please use the following guide to install it on your system.

5. Now add these parameters to disable anonymous connections from using SSL and force all non-anonymous connections over SSL.

allow_anon_ssl=NO # disable anonymous users from using SSL
force_local_data_ssl=YES # force all non-anonymous logins to use a secure SSL connection for data transfer
force_local_logins_ssl=YES # force all non-anonymous logins to send the password over SSL

6. Next, add these option to disable all reuse of SSL data connections and set the SSL ciphers HIGH to allow encrypted SSL connections.

require_ssl_reuse=NO
ssl_ciphers=HIGH

7. You also have to specify the port range (min and max port) of passive ports to be used by vsftpd for secure connections, using the pasv_min_port and pasv_max_port parameters respectively. In addition, you can optionally enable SSL debugging for troubleshooting purposes, using the debug_ssl option.

pasv_min_port=40000
pasv_max_port=50000
debug_ssl=YES

8. Finally, save the file and restart the vsftpd service for the above changes to take effect.

# systemctl restart vsftpd

9. One more critical task to perform before you can securely access the FTP server is to open the ports 990 and 40000-50000 in the system firewall. This will allow TLS connections to vsftpd service and open the port range of passive ports defined in the VSFTPD configuration file respectively, as follows.

Step 3: Install FileZilla to Securely Connect to the FTP Server

10. To securely connect to the FTP server, you need an FTP client that supports SSL/TLS connections such as FileZilla – is an open source, widely-used, cross-platform FTP, SFTP, and FTPS client that supports SSL/TLS connections by default.

11. After the Filezilla package is installed, search for it in the system menu and open it. To quickly connect the remote FTP server, from the main interface, provide the Host IP address, Username, and user’s Password. Then click QuickConnect.

Connect to FTP Server Using Filezilla

12. Then the application will ask you to allow secure connection using the unknown, self-signed certificate. Click OK to proceed.

Accept SSL Certificate to Connect FTP

If the configuration at the server is fine, the connection should be successful as shown in the following screenshot.

Connected FTP Server

13. Finally, test the FTP secure connection status by trying to upload files from your machine to the server as shown in the next screenshot.

Securely Transfer Files via Filezilla

That’s all! In this article, we showed how to secure an FTP server using SSL/TLS for secure file transfer in RHEL 8. This is the second part of our comprehensive guide to install, configure and secure an FTP server in RHEL 8. To share any queries or thoughts, use the feedback form below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.