Установка ProFTPd на CentOS 7

оригинал тут https://www.liquidweb.com/kb/how-to-install-proftpd-on-centos-7/

FTP (File Transfer Protocol) is probably the most popular method of uploading files to a server; a wide array of FTP servers, such as ProFTPD, and clients exist for every platform.

Pre-Flight Check
  • These instructions are intended specifically for installing the ProFTPD on CentOS 7.
  • I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as root.
Step 1: Add the EPEL Repository

ProFTPD is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we’ll install the EPEL repository:

Версия файла epel-release-7-8.noarch.rpm может отличатся от текущей!

Step 2: Install ProFTPD

Warning: FTP data is insecure; traffic is not encrypted, and all transmissions are clear text (including usernames, passwords, commands, and data). Consider securing your FTP connection with SSL/TLS.

As a matter of best practice we’ll update our packages:

Then let’s install ProFTPD and any required packages:

Step 3: Configure ProFTPD

все удаляем из конфига и вставляем кастомный:

Change the ServerName to the hostname of your server. In the case below, ftp.thebestfakedomainnameintheworld.com is an example:

ServerName “ftp.thebestfakedomainnameintheworld.com”

Создаем каталог и файл для пользователей и нужных атрибутов:

 

Restart the ProFTPD service:

Then set the ProFTPD service to start at boot:

And verify your work by checking the status of ProFTPD:

 

Step 4: Allow ProFTPD Through the Firewall

Allow the default FTP port, port 21, through firewalld:

firewall-cmd --permanent --add-port=21/tcp

And reload the firewall:

firewall-cmd --reload

В нашем случае, когда FTP за NAT’ом, надо назначить и прокинуть нужные нам порты:

Настройка iptables на root’ой ноде:

диапазон портов выбираем из 49152 — 65535

Iptables внутри контейнера:

 

Добавить комментарий

Ваш адрес email не будет опубликован.