
FTP (Introduction):
- It is a protocol used to download files from FTP Server to the client computer and vice versa (upload files to the FTP server from Client computer).
- Port no. 21 – used by server for incoming connection from client.
(Connection, response, command passes using this port) - Port no. 20 – outbound control (data flow)
FTP SERVER (Configuration):
Install the required packages:
# yum install *ftp*
Add entries of network (in hosts.allow) that can communication with ftp server:
# vim /etc/hosts.allow
vsftpd: 192.168.1. (to allow this network)
If you have iptable enabled, allow TCP and UPD traffic for port no. 20 & 21:
# vim /etc/sysconfig/iptables
Add entry of ftp in IPTABLES_MODULES as below:
# vim /etc/sysconfig/iptables-config
IPTABLES_MODULES= “ip_conntrack_netbios_ns ip_conntrack_ftp”
Add user who you want to allow ftp access:
# vim /etc/vsftpd/user_list
Add user who you want to deny ftp access:
# vim /etc/vsftpd/ftpusers
# vim /etc/vsftpd/vsftpd.conf
anon_upload_enable=yes (to allow upload to the FTP Server)
anonymous_enable=NO (by default it is YES)
userlist_enable=NO (by default it is YES)
Note: if you don’t change the above setting in vsftpd.conf, anonymous users are allowed for ftp access)
# service network restart
# service iptables restart
# service vsftpd restart
Configuration Video:





