FTP Flashcards
1
Q
Configure anonymous-only download
A
Configure anonymous-only download
1. Install the vsftpd package # yum install -y vsftpd
2. edit the /etc/vsftpd/vsftpd.conf file and set the local_enable directive to NO: # vim /etc/vsftpd/vsftpd.conf local_enable=NO anonymous_enable=YES anon_upload_enable=NO
- Configure SELinux to support the service
# getsebool -a | grep ftpd
use public_content_t file context for content
4. open firewall for port 20 & 21 # iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT # iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
5. Save firewall configuration # service iptables save
6. edit the /etc/sysconfig/iptables-config file and change the IPTABLES_MODULES directive: # vi /etc/sysconfig/iptables-config IPTABLES_MODULES="nf_conntrack_ftp nf_nat_ftp"
7. Restart the iptables service # service iptables restart
8. Activate the vsftpd service at boot # chkconfig vsftpd on
9. Start the vsftpd service # service vsftpd start