Posts VSFTPd
Post
Cancel

VSFTPd

VSFTPD is a FTP server for UNIX like system. There will be slight difference in commands as well as file locations for different distributions. This tutorial will be covering centOS system as of current. More might be added in the future.

1 Update packages list / repository

It is always a good habit to update the repository before installing a software as there could be a newer version.

1
$ sudo yum update -y

2 Installing vsftpd

1
$ sudo yum install vsftpd -y

3 Enabling and starting vsftpd

1
$ sudo systemctl start vsftpd
1
$ sudo systemctl enable vsftpd

4 Setting up config file

4.1 Backup

1
$ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak

4.2 Download config

1
sudo curl https://teamcookiez.github.io/assets/files/ftp_config.conf -o /etc/vsftpd/vsftpd.conf
1
sudo systemctl restart vsftpd

5 Generating certificate (OPTIONAL)

1
sudo mkdir /etc/ssl/private
1
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
1
sudo printf "rsa_cert_file=/etc/ssl/private/vsftpd.pem\nrsa_private_key_file=/etc/ssl/private/vsftpd.pem\n" >> /etc/vsftpd/vsftpd.conf
1
sudo printf "ssl_enable=YES\nallow_anon_ssl=NO\nforce_local_data_ssl=YES\nforce_local_logins_ssl=YES\n" >> /etc/vsftpd/vsftpd.conf
1
sudo printf "ssl_tlsv1=YES\nssl_sslv2=NO\nssl_sslv3=NO\nrequire_ssl_reuse=NO\nssl_ciphers=HIGH\n" >> /etc/vsftpd/vsftpd.conf
1
sudo systemctl restart vsftpd
This post is licensed under CC BY 4.0 by the author.