{"id":1102,"date":"2018-10-21T08:22:46","date_gmt":"2018-10-21T08:22:46","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=1102"},"modified":"2018-10-23T00:45:07","modified_gmt":"2018-10-23T00:45:07","slug":"install-and-configure-proftpd-on-centos","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/21\/install-and-configure-proftpd-on-centos\/","title":{"rendered":"Install And Configure ProFTPD On CentOS"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxadmin.io\/wp-content\/uploads\/2017\/07\/installing_proftpd.png\" alt=\"ProFTPD Installation\" width=\"667\" height=\"195\" \/><\/p>\n<p>ProFTPd is an Open source FTP daemon, widely used for its granular configuration ability. This is a guide to provide install methods for both CentOS 7 aswell as CentOS 6 and below. You can read more about ProFTPD on the <a href=\"http:\/\/www.proftpd.org\/docs\/\">project\u2019s website<\/a>.<\/p>\n<h2>Install ProFTPD<\/h2>\n<p>ProFTPD is in the EPEL repository, you will need to install that first:<\/p>\n<p>yum -y install epel-release<\/p>\n<p>Run a yum update to ensure everything is up to date<\/p>\n<p>yum -y update<\/p>\n<p>Install ProFTPD<\/p>\n<p>yum -y install proftpd<\/p>\n<h3>Configure ProFTPD<\/h3>\n<p>nano \/etc\/proftpd.conf<\/p>\n<p>Change the server name:<\/p>\n<p>ServerName &#8220;ProFTPD server&#8221;<\/p>\n<p>To your servers hostname. Go ahead and save the file afterwards.<\/p>\n<h3>Enable and Start Proftpd<\/h3>\n<p>Go ahead and restart the service and enable it.<\/p>\n<p>On CentOS 7:<\/p>\n<p>Restart the service:<\/p>\n<p>systemctl restart proftpd<\/p>\n<p>Make sure the service will start after a reboot:<\/p>\n<p>systemctl enable proftpd<\/p>\n<p>On CentOS 6(and below):<\/p>\n<p>Restart the service:<\/p>\n<p>service proftpd restart<\/p>\n<p>Make sure the service will start on reboot:<\/p>\n<p>chkconfig &#8211;add proftpd<br \/>\nchkconfig proftpd on<\/p>\n<h3>Enable FTP in the firewall<\/h3>\n<p>If you are currently using a firewall, you will need to allow incoming FTP connections.<\/p>\n<h4>Firewalld<\/h4>\n<p>Allow the port for incoming:<\/p>\n<p>firewall-cmd &#8211;permanent &#8211;add-port=21\/tcp<\/p>\n<p>then reload the firewall:<\/p>\n<p>firewall-cmd-reload<\/p>\n<h4>Iptables<\/h4>\n<p>Add the new rule:<\/p>\n<p>iptables -A INPUT -p tcp -m tcp &#8211;dport 20:21 -j ACCEPT<\/p>\n<p>Save the new firewall ruleset:<\/p>\n<p>iptables-save &gt; \/etc\/sysconfig\/iptables<\/p>\n<h2>Enabling passive connections in ProFTPD<\/h2>\n<p>Passive mode can sometimes resolve certain clients ability to connect to the FTP server which may have been blocked by firewalls. If you are having issues connecting remotely, would like you to try to to enable passive connections in ProFTPD you will need to edit \/etc\/proftpd.conf<\/p>\n<p>nano \/etc\/proftpd.conf<\/p>\n<p>And add the following lines:<\/p>\n<p>PassivePorts 60000 65535<br \/>\nAllowStoreRestart on<br \/>\nAllowRetrieveRestart on<br \/>\nTimeoutNoTransfer 65535<br \/>\nListOptions &#8220;-la&#8221;<br \/>\nTimeoutIdle 65535<\/p>\n<p>You will then also need to add the passive range in the firewall<\/p>\n<h4>Iptables:<\/h4>\n<p>Add the new rule:<\/p>\n<p>iptables -A INPUT -p tcp -m tcp &#8211;dport 60000:65535 -j ACCEPT<\/p>\n<p>Save the ruleset:<\/p>\n<p>iptables-save &gt; \/etc\/sysconfig\/iptables<\/p>\n<h4>Firewalld:<\/h4>\n<p>Add the new port range:<\/p>\n<p>firewall-cmd &#8211;permanent &#8211;add-port=60000-65535\/tcp<\/p>\n<p>Reload the firewall:<\/p>\n<p>firewall-cmd-reload<\/p>\n<h2>Testing The FTP Service<\/h2>\n<p>You can test the FTP configuration locally first to ensure the daemon is running by using netstat<\/p>\n<p># netstat -plan|grep :21<br \/>\ntcp6 0 0 :::21 :::* LISTEN 22089\/proftpd: (acc<\/p>\n<p>You can also connect locally by installing the ftp client<\/p>\n<p>yum install -y ftp<\/p>\n<p>And then making a connection to the localhost or 127.0.0.1<\/p>\n<p># ftp localhost<br \/>\nTrying ::1&#8230;<br \/>\nConnected to localhost (::1).<br \/>\n220 FTP Server ready.<br \/>\nName (localhost:root):<\/p>\n<p>And enter and valid username and password and it should authenticate. If it does not let you in, the authentication messages are written to \/var\/log\/secure.<\/p>\n<p>Jul 17, 2017LinuxAdmin.io<\/p>\n<p><a href=\"https:\/\/linuxadmin.io\/install-proftpd-centos\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ProFTPd is an Open source FTP daemon, widely used for its granular configuration ability. This is a guide to provide install methods for both CentOS 7 aswell as CentOS 6 and below. You can read more about ProFTPD on the project\u2019s website. Install ProFTPD ProFTPD is in the EPEL repository, you will need to install &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/21\/install-and-configure-proftpd-on-centos\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install And Configure ProFTPD On CentOS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1102\/revisions"}],"predecessor-version":[{"id":1342,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1102\/revisions\/1342"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}