i will show you in this tutorial how to install Vsftpd with ssl/tls . i think installing an normal vsftpd server is not difficult even for an beginner on Linux let me show you my server info :
Server : Centos 7.5 IP = 192.168.0.210 Hostname = osradar.centos.local
- Advertisement -
First Update your system
yum update -y
Install openssl with this Command
yum install openssl -y
Let us create a directory to store SSL certificates.
mkdir /etc/ssl/private
Lets Create Certificates and keys for Vsftpd Server with this Command :
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
Install VSftpd Server
yum install -y vsftpd
Enable and start vsftpd
systemctl enable vsftpd systemctpd start vsftpd
Add the following lines at the end:
vi /etc/vsftpd/vsftpd.conf
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
Allow the FTP to the firewall rules
firewall-cmd --permanent --add-port=21/tcp
firewall-cmd --
reload
Restart vsftpd and connect from ftp client in my situation Am using filezilla
systemctl restart vsftpd
Activate Active mode from settings to simplify the connection and connect
Accept the Certificate
Please Enjoy , Cheers !!
- Advertisement -
Subscribe
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"