$ sudo apt-get install vsftpdStep # 2: Configure /etc/vsftpd.conf The default vsftpd configuration file is /etc/vsftpd.conf. You need to edit this file using text editor such as vi:
$ sudo vi /etc/vsftpd.confAdd the following line (uncomment line) to the vsftpd configuration file:
local_enable=YESAbove config directive will allow local users to log in via ftp If you would like to allow users to upload file, add the following to the file:
write_enable=YESFor security you may restrict local users to their home directories. Add the following to the file:
chroot_local_user=YESSave and close the file. Step # 3: Restart vsftpd To restart vsftpd type the command :
$ sudo /etc/init.d/vsftpd restartHow do I use ftp to login? Now you should be able to FTP to this server with any account that exists on the system except for root user. From Windows or other Linux system use ftp client, type the command:
$ ftp www.edreaminghome.comOpen FTP port using iptables (optional) Add following rules to your iptables script. Assuming that default incoming policy is drop. If protocol is TCP and destination port is 21 (ftp): iptables -A INPUT -p tcp -m tcp –dport 21 -j ACCEPT