Tuesday, August 27, 2013

Installing passive vsftpd in amazon ec2

Sponsored Links
We have seen how to enable passive mode in vsftpd ftp daemon in our previous post. In this one we will see how to install vsftpd and enable passive mode in amazon ec2 instances.

Install vsftpd package
#yum install vsftpd

Open the vsftpd conf file for editing
#vi /etc/vsftpd/vsftpd.conf

Add the following lines at bottom of the configuration file.
userlist_enable=YEStcp_wrappers=YES
pasv_min_port=12000
pasv_max_port=12100
listen_port=21
pasv_enable=YES
pasv_address=YOUR EIP or Enter your Amazon hostname
pasv_addr_resolve=YES

Now open the port 20,21, and range 12000-12100 in amazon security group for the instance.

Opening ports 20,21and range 12000-12100 in tcp and udp




Now restart the vsftpd service as follows.
#service vsftpd restart

Add chkconfig entry to survive the reboots
#chkconfig vsftpd on

if you are using iptables or csf open the ports in those also.

Now test from any ftp client. For eg: filezilla.
You are done!
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.