logo

Set Up FTP server on Linux

VSftp on Centos

Category: Linux

by designzone

2014-10-10 14:35:49

SET UP VS-FTP SERVER
yum install -y vsftpd

chkconfig vsftpd on
/etc/init.d/vsftpd start

Added the following to the ftp host in:
/etc/sysconfig/iptables-config

IPTABLES_MODULES="ip_conntrack_ftp"

EDIT iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

/etc/init.d/iptables restart
/etc/init.d/vsftpd restart

EDIT /etc/vsftpd/vsftpd.conf
anonymous_enable=NO

local_enable=YES
chroot_local_user=YES
/etc/init.d/vsftpd restart

EDIT /etc/vsftpd/vsftpd.conf (User YOUR IP)
pasv_enable=Yes
pasv_max_port=10100
pasv_min_port=10090
pasv_address=25.24.245.90

Add this to the firewall settings
-A INPUT -p tcp --destination-port 10090:10100 -j ACCEPT

/etc/init.d/vsftp restart
/etc/init.d/iptables restart

comments powered by Disqus