{"id":3691,"date":"2018-01-03T17:45:06","date_gmt":"2018-01-03T17:45:06","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3691"},"modified":"2018-01-03T17:45:06","modified_gmt":"2018-01-03T17:45:06","slug":"install-proftpd-centos-7","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2018\/01\/03\/install-proftpd-centos-7\/","title":{"rendered":"Install Proftpd in CentOS 7"},"content":{"rendered":"<p>How to Add Proftpd in CentOS 7 for ftp access.<\/p>\n<p>Step 1: Add the EPEL Repository<br \/>\nProFTPD is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we\u2019ll install the EPEL repository:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# rpm -iUvh http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-7-5.noarch.rpm\n\n<\/pre>\n<p>Step 2: Install ProFTPD<\/p>\n<p>Let&#8217;s update first:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum -y update\n\n<\/pre>\n<p>Then let\u2019s install ProFTPD and any required packages:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum -y install proftpd\n\n<\/pre>\n<p>Step 3: Configure ProFTPD<br \/>\nFor a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor<\/p>\n<p>Let\u2019s edit the configuration file for ProFTPD:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# nano \/etc\/proftpd.conf\n\n<\/pre>\n<p>Change the ServerName to the hostname of your server. In the case below, ftp.domainname.com is an example:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nServerName \u201cftp.domainname.com\u201d\n\n<\/pre>\n<p>Enabling TLS In ProFTPD<br \/>\nAdd and modify the lines as below.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# nano \/etc\/proftpd.conf\n&#x5B;...]\nDefaultRoot                     ~ !adm\nPassivePorts 60000 65535\n&#x5B;...] \n\n#\n  TLSEngine                     on\n  TLSRequired                   on\n  TLSRSACertificateFile         \/etc\/pki\/tls\/certs\/proftpd.pem\n  TLSRSACertificateKeyFile      \/etc\/pki\/tls\/certs\/proftpd.pem\n  TLSCipherSuite                ALL:!ADH:!DES\n  TLSOptions                    NoCertRequest\n  TLSVerifyClient               off\n  TLSRenegotiate                ctrl 3600 data 512000 required off timeout 300\n  TLSLog                        \/var\/log\/proftpd\/tls.log\n#  \n#    TLSSessionCache            shm:\/file=\/var\/run\/proftpd\/sesscache\n#  \n#\n&#x5B;...] \n\n<\/pre>\n<p>Exit and save the file with the command :wq .<\/p>\n<p>Restart the ProFTPD service:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# systemctl restart proftpd\n\n<\/pre>\n<p>Then set the ProFTPD service to start at boot:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# systemctl enable proftpd\n\n<\/pre>\n<p>And verify your work by checking the status of ProFTPD:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# systemctl status proftpd\n\n<\/pre>\n<p>Step 4: Allow ProFTPD Through the Firewall<br \/>\nAllow the default FTP port, port 21, through firewalld:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# firewall-cmd --permanent --add-port=21\/tcp\n# firewall-cmd --add-port=60000-65535\/tcp --permanent\n<\/pre>\n<p>And reload the firewall:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nfirewall-cmd --reload\n\n<\/pre>\n<p>In order to use TLS, we must create an SSL certificate. Create it in \/etc\/pki\/tls\/certs, we can generate the SSL certificate as follows:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# openssl req -x509 -nodes -newkey rsa:1024 -keyout \/etc\/pki\/tls\/certs\/proftpd.pem -out \/etc\/pki\/tls\/certs\/proftpd.pem\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#x5B;root@webhost certs]# openssl req -x509 -nodes -newkey rsa:1024 -keyout \/etc\/pki\/tls\/certs\/proftpd.pem -out \/etc\/pki\/tls\/certs\/proftpd.pem -nodes -days 365\nGenerating a 1024 bit RSA private key\n.++++++\n...........................................................++++++\nwriting new private key to &#039;\/etc\/pki\/tls\/certs\/proftpd.pem&#039;\n-----\nYou are about to be asked to enter information that will be incorporated\ninto your certificate request.\nWhat you are about to enter is what is called a Distinguished Name or a DN.\nThere are quite a few fields but you can leave some blank\nFor some fields there will be a default value,\nIf you enter &#039;.&#039;, the field will be left blank.\n-----\nCountry Name (2 letter code) &#x5B;XX]:US\nState or Province Name (full name) &#x5B;]:Texas\nLocality Name (eg, city) &#x5B;Default City]:Austin\nOrganization Name (eg, company) &#x5B;Default Company Ltd]:TestCo\nOrganizational Unit Name (eg, section) &#x5B;]:IT\nCommon Name (eg, your name or your server&#039;s hostname) &#x5B;]:webhost.domainname.com\nEmail Address &#x5B;]:test@gmail.com\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# chmod  0440 \/etc\/pki\/tls\/certs\/proftpd.pem\n<\/pre>\n<p>Restart:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# systemctl restart proftpd.service\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to Add Proftpd in CentOS 7 for ftp access. 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\u2019ll install the EPEL repository: # rpm -iUvh http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-7-5.noarch.rpm Step 2: Install ProFTPD Let&#8217;s update first: &#8230; <a title=\"Install Proftpd in CentOS 7\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2018\/01\/03\/install-proftpd-centos-7\/\" aria-label=\"Read more about Install Proftpd in CentOS 7\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,42],"tags":[],"class_list":["post-3691","post","type-post","status-publish","format-standard","hentry","category-centos-7","category-ftp"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=3691"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3691\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}