In this article Python code install and configure FTPS server to CentOS7 server. In CentOS7 server SeLinux is already enabled. Python code automatically generates certificate, creates user, configure firewall and SeLinux for FTPS. At the end we will check result with Filezilla client from Windows desktop.

Our network topology will be as following:
vsftpd-ftps-via-python

Clone git repository to the local folder in your Linux Desktop. Go to already downloaded folder and execute install.py script:
$ git clone https://github.com/jamalshahverdiev/CentOS7-VSFTPD-FTPS.git
$ cd CentOS7-VSFTPD-FTPS.git
$ ./install.py

exec-ftps-script

Script will ask you enter network card name to configure SeLinux and Firewall for FTPS:
result-of-ftps-python

Then go to the Windows desktop and open Filezilla client(Write username and password which you entered before and press Quickconnect button):
filezilla-client-ftps

As we see we must accept certificate which FTPS server gives us:
filezilla-ftps-certificate

Look at the result:
result-ftps-vsftpd

Advertisements