Friday, 7 June 2013

How to configure FTP Server in Linux

What is FTP?

  FTP, the File Transfer Protocol, is one of the original network applications developed with the TCP/IP protocol suite. It follows the standard model for network services, as FTP requires a client and a server , the first implementations of FTP date back to 1971.  FTP set out to solve the need to publish documents and software so that people could get them easily from other computer systems. On the FTP server, files were organized in a directory structure; users could connect to the server over the network ,and download files from (and possibly upload files to) the server. 
 What is vsftpd?

The Very Secure FTP Server (vsFTPd) is the only FTP server software included in the Red Hat Linux distribution , vsFTPd is becoming the FTP server of choice for sites that need to support thousands of concurrent downloads. It was also designed to secure your systems against most common attacks. 
    Configuration Files

/etc/vsftpd/vsftpd.conf  : Main Configuration File
/etc/vsftpd/ftpusers  : Contains Users list to deny permanently
/etc/vsftpd/user_list  : Contains Users list to allow or deny
FTP uses TCP ports 20 (for ftp data) & 21 (ftp program). 
Starting vsftpdservice
service    vsftpd    start
chkconfig    --level   345   vsftpd  on  
Client Side Commands 
  For Connecting to FTP Server 
ftp     10.10.10.101
For Installing Packages from FTP  server 
rpm  -ivh  ftp://x.x.x.x/pub/Server/package.rpm
 Hardening FTP

Limit users to their “home directory” only.   vi /etc/vsftpd/vsftpd.conf
  chroot_local_user=YES
Allowing “anonymous” upload to FTP
STEP – 1:   vi /etc/vsftpd/vsftpd.conf 
anon_upload_enable=YES] 
chown_uploads=YES   
chown_username=daemon 
anon_umask=077  
STEP -2: Create a directory under – mkdir /var/ftp/incoming 
chmod   730  /var/ftp/incoming
chown   root:ftp   /var/ftp/incoming

STEP – 3: Set the Boolean value: 
setsebool   -P   allow_ftpd_full_access   on
service vsftpd restart

No comments:

Post a Comment