FTP Configuratgion
FTP Configuratgion
1.Bereket Elias………………………..0110
2.Askalu Guesh……………………….0107
3.Filera Tsegaye……………………....0121
4.Yeshi Bayelgn………………………0141
☞FTP Types
FTP OVERVIEW
FTP relies on a pair of TCP ports to get the job done. It operates using
two connection channels:
☞ FTP control channel, TCP Port 21: All commands you send, as
well as the FTP server’s responses to those commands, go over the
control connection, but any data sent back (such as ls directory lists or
actual file data in either direction) will go over the data connection.
☞ FTP data channel, TCP Port 20: This port is used for all
subsequent data transfers between the client and server.
Con…
Types of FTP
From a networking perspective, the two main types of FTP are active
and passive. In active FTP, the FTP server initiates a data transfer
connection back to the client. For passive FTP, the connection is
initiated from the FTP client.
Active FTP
The sequence of events for active FTP is:
1.Your client connects to the FTP server by establishing an FTP control connection to port 21
of the server. Your commands such as ls and get are sent over this connection.
2.Whenever the client requests data over the control connection, the server initiates data
transfer connections back to the client. The source port of these data transfer connections is
always port 20 on the server, and the destination port is a high port (greater than 1024) on the
client.
3.Thus the ls listing that you asked for comes back over the port 20 to high port connection,
not the port 21 control connection.
FTP active mode, therefore, transfers data in a counter intuitive way to the TCP standard, as it
selects port 20 as its source port (not a random high port that’s greater than 1024) and
connects back to the client on a random high port that has been pre-negotiated on the port 21
control connection.
Con…
Active FTP may fail in cases where the client is protected from the Internet via many to one NAT (masquerading),
because the firewall will not know which of the many servers behind it should receive the return connection.
Passive FTP
Passive FTP works differently:
1.Your client connects to the FTP server by establishing an FTP control connection to port 21 of the server. Your
commands such as ls and get are sent over that connection.
2.Whenever the client requests data over the control connection, the client initiates the data transfer connections to
the server. The source port of these data transfer connections is always a high port on the client with a destination
port of a high port on the server.
Passive FTP should be viewed as the server never making an active attempt to connect to the client for FTP data
transfers. Because the client always initiates the required connections, passive FTP works better for clients protected
by a firewall.
Con…
As Windows defaults to active FTP and Linux defaults to passive, you’ll probably have to
accommodate both forms when deciding upon a security pol-icy for your FTP server.
Regular FTP
By default, the VSFTPD package allows regular Linux users to copy files to and from their
home directories with an FTP client using their Linux user-names and passwords as their login
credentials.
VSFTPD also has the option of allowing this type of access to only a group of Linux users,
enabling you to restrict the addition of new files to your system to authorized personnel.
The disadvantage of regular FTP is that it isn’t suitable for general download distribution of
software as everyone either has to get a unique Linux user account or has to use a shared
username and password. Anonymous FTP allows you to avoid this difficulty.
Con…
In the Anonymous mode, remote clients can access the FTP server by using the
default user account called "anonymous" or "ftp" and sending an email address as
the password. In the Authenticated mode a user must have an account and a
password. This latter choice is very insecure and should not be used except in
special circumstances. If you are looking to transfer files securely see SFTP in the
section on Open SSH-Server. User access to the FTP server directories and files is
dependent on the permissions defined for the account used at login. As a general
rule, the FTP daemon will hide the root directory of the FTP server and change it to
the FTP Home directory. This hides the rest of the file system from remote sessions.
Con…
Finally, copy any files and directories you would like to make available through
anonymous FTP to /srv/ files/ftp, or /srv/ftp if you wish to use the default.
User Authenticated FTP Configuration