Thursday, 9 June 2011

Configure a system to run a default configuration FTP server

This is almost identical to this objective. Oddly enough this is pretty much the same objective as Configure anonymous-only download from the RHCE exam.

The first step is to install vsFTP daemon and the ftp client for testing purposes
yum install vsftpd ftp
 Now, you can switch it on with
service vsftpd start
Since you presumably want the ftp server to be running automatically at boot, you need to do the following:
chkconfig vsftpd on
That's it, you now have a vsFTP running and configured to start at boot.  You just need to allow traffic to it, so open the firewall for port 21 and save it:
iptables -I INPUT -p tcp --dport ftp -j ACCEPT; iptables-save > /etc/sysconfig/iptables
You can check this by using the ftp client to connect anonymously to your ftp server, e.g.
Connected to (
220 (vsFTPd 2.2.2)
Name ( anonymous
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,143,26).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0            4096 May 26  2010 pub
226 Directory send OK.
Make sure that the username is anonymous. You don't need to enter a password, just hit enter.

No comments:

Post a Comment