Guide to setup vsFTPD
STEP 1: Install vsFTPD
1. To install FTP Server (vsFTPD)
#yum install vsftpd
2. To install FTP Client
#yum install ftp
STEP 2: Configure vsFTPD
1. Stop vsftpd service
#service vsftpd stop
2. Edit vsftpd config file /etc/vsftpd/vsftpd.conf
Parameters Action
anonymous_enable=YES Change value to ‘NO’
chroot_local_user=YES Uncomment parameter
3. (OPTIONAL) If you would like to add banner message
a. Create banner file and enter banner message
#touch /etc/vsftpd/banner
#vi /etc/vsftpd/banner
b. Edit vsftpd config file /etc/vsftpd/vsftpd.conf and add new parameter
banner_file=/etc/vsftpd/banner
4. Set SELinux Booleans parameter ftp_home_dir to 1 to allow to connect logon home directory
#setsebool -P ftp_home_dir 1
If this parameter is not set to 1, logon ftp user will fail to connect to home directory
5. Set vsftpd service startup
#chkconfig vsftpd on
6. Start vsftpd service
#service vsftpd start
STEP 3: Configure IPTables Firewall
1. Edit IPTables Config to load IP Modules and Add IPTABLES_MODULES ip_conntrack_ftp
#vi /etc/sysconfig/iptables-config
2. Edit IPTables Firewall Rules and add Allow FTP Connection
#vi /etc/sysconfig/iptables
Add the following entry before REJECT rules and COMMIT
-A INPUT -J ACCEPT -m state –state NEW -p tcp –dport 21
3. Restart IPTables Service
#service iptables restart