Learn Linux Series (#2) - Proftpd management and configuration
utopian-io·@vitusc·
0.000 HBDLearn Linux Series (#2) - Proftpd management and configuration
**Learn Linux Series (#2) - Proftpd management and configuration** https://steemitimages.com/0x0/https://habrastorage.org/getpro/habr/post_images/9e3/d19/948/9e3d19948ac4132613bf784ef7c7d229.png #### What Will I Learn? - What is proftpd - How to install Proftpd - How to configure Proftpd - Starting, restarting and stopping the server - Restrictions about IP and hosts from which you can log in - Logging in as an anonymous user to the server - Server load constraints - Troubleshooting ProFTPD #### Requirements - Linux system installed - Basic knowledge of terminal operation - Average knowledge of linux commands - Motivation when something goes wrong #### Difficulty Intermediate <br> <center> https://bmat.pl/wp-content/uploads/2015/02/proftpd.jpg <br> **Learn Linux Series (#2) - Proftpd management and configuration** <br> - **What is proftpd** <br> </center> FTP allows you to transfer files between a server computer and a client computer. The connection via the FTP protocol can work in two modes: active passive. In active mode, FTP uses port 21 for commands and port 20 for data transfer. In passive mode, FTP uses port 21 for commands and a port number above 1024 for data transmission. <br> - **Proftpd Installation** <br> In the terminal, we must execute the command to download the proftpd software. To do this, enter the command: ``` language apt-get install proftpd ``` <br> if a message pops up that we do not have administrator rights, we must execute the command: ``` language sudo -s ``` (this command gives us administrator privileges, and keeps them at all times while the terminal is running). After downloading the software, it's time to launch it.<br> - **Starting, restarting and stopping the server**<br> We will need these commands:<br> Server launch: ``` language /etc/init.d/proftpd start ``` Message that should appear when the Proftpd server is successfully started:  Server restart: ``` language /etc/init.d/proftpd restart ``` Server stop: ``` language /etc/init.d/proftpd stop ``` If we already know how to install, run, disable, restart the server, then we have to get to the configuration. <br> - **Proftpd configuration**<br> The basic configuration file is /etc/proftpd.conf<br> The simplest, enabling the server to work properly, the configuration file is: ``` language ServerName "utopian" ServerAdmin email@utopian.admin ServerType standalone DefaultServer on DefaultRoot ~ Port 21 Umask 002 User utopian Group utopian ``` <br> - **Restrictions about IP and hosts from which you can log in**<br> Sometimes it happens that we have to set access restrictions to the server. Limitations can be determined in two ways. <br> Method 1:<br> By default, let everyone in, except for some addresses.<br> ``` language <Limit LOGIN> Order allow,deny Deny from c.utopian.io Deny from p.utopian2.io </Limit> ``` Computers from "Deny from" will not be allowed into the server. All others will be let in. <br> Method 2:<br> By default, allow selected people, and the rest do not allow.<br> ``` language <Limit LOGIN> Order deny,allow Allow from c.utopian.io </Limit> ``` Only computers entered in "Allow from" will be allowed to the server.<br> - **Logging in as an anonymous user to the server**<br> Anonymous is a special user that have allowed access to public server resources. We can log in without entering the password and freely download the software available. An example configuration of an anonymous account: ``` language User ftp - user Group ftp - group AnonRequirePassword off - loggining without password UserAlias anonymous ftp - user's aliases DisplayLogin .welcome.msg - welcome message DisplayFirstChdir .message -message that appears after entering the catalog GroupOwner ftp Umask 002 <Limit WRITE> DenyAll <Limit> <Limit READ DIRS> IgnoreHidden on <Limit> ``` <br> - **Server load constraints**<br> It happens that the traffic on the server is so big, it overloads the server so much that it can not be operated. In this case, we need to introduce server load constraints. We use two commands for this:<br> ``` language MaxClients ``` and ``` language MaxClientsPerHost ``` Sample configuration: ``` language MaxClients 100 "There are currently too many people on the utopian server, try again later!" MaxClientsPerHost 12 "You have too many open connections, you can not enter to utopian." ``` <br> - **Troubleshooting ProFTPD**<br> Error messages can be found in ``` language /var/log/proftpd/proftpd.log ``` by default, if the Proftpd server does not work after installation, you can check this file. Sometimes, the server is delayed and you can not access the server. The message "Connection refused" will then pop up. It is not a problem. You must restart the ProFTPD server until it works. <br> Default log message if everything is okay: ``` language 2018-03-08 13:04:35,072 vitusc-utopian proftpd[2205] vitusc-utopian: ProFTPD 1.3.5d (maint) (built Thu Ja$ ``` #### Curriculum [Part 1 - TCP/IP Computer Adaptation](https://utopian.io/utopian-io/@vitusc/learn-linux-series-1-tcp-ip-computer-adaptation) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@vitusc/learn-linux-series-2-proftpd-management-and-configuration">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 peancy, mys, steemnova, leir, jaff8, greenorange, yuxi, grzesiekb, just2random, nvidovskaya, pizezomat, vitusc, dintellectual, utopian-1up, flauwy, mahdiyari, simonluisi, stoodkev, ansonoxy, espoem, nathalie13, not-a-bird, bitopia, berkaytekinsen, family.app, maphics, proffgodswill, sweeverdev, howtosteem, helo, ronimm, letsmakes, jesdn16, franklan3386, yeswanth, roj, jacintoelbarouki, thatmemeguy, dyancuex, herman2141, mufasatoldyou, makrotheblack, thinkkniht, onos, luisrod, parag, zouxx, kimaben, kslo, navx, ilovekrys, sebastiengllmt, luoq, zlatkamrs, amosbastian, bobsthinking, acrywhif, layanmarissa, isacastillor, jerybanfield, rhotimee, patatesyiyen, deejee, rsteem, onin91, isabella394, zinonweke, emirfirlar, lemony-cricket, exploreand, petvalbra, olayhemy, photohunter1, photohunter2, photohunter3, photohunter4, photohunter5, sylinda, fmbs25, livsky, badmusazeez, amirdesaingrafis, fai.zul, nightdragon, flinter, opulence, donjyde, crispycoinboys, bluestorm, pepememes, flugbot, yekrats, walnut1, ilyastarar, jfuenmayor96, xtramedium, smafey, timmyeu, omersurer, steaknsteem, eleonardo, zohaib715, idontgnu, checkthisout, handfree42, carsonroscoe, xplore, anmeitheal, solomon507, emailbox19149, rayday, kaking, hmctrasher, josh26, charitybot, aderemi01, killbill73, adejokeade, reazuliqbal, aliyu-s, muratti, muammarnst, jayo, tintailmu, animesukidesu, derasmo, anime.lovers, steemlore, truthtrader, studytext, charitymemes, drigweeu, toninux, fabiocola, jdc, devilonwheels, eric-boucher, bargolis, phasma, heshe-f, idlebright, adhew, jrmiller87, gwapoaller, genoner, musicbot, utopian-io, steemtux, mairosoft,