25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

In normal mode, the FTP client first connects to the FTP server port 21 to<br />

establish a control connection. When data transfer is required (for example, as<br />

the result of a DIR, GET, or PUT comm<strong>and</strong>), the client sends a PORT comm<strong>and</strong><br />

to the server instructing the server to establish a data connection from the<br />

server's data port (port 20) to a specified ephemeral port number on the client<br />

host.<br />

In an FTP proxy server situation, normal mode means that we have to allow<br />

inbound <strong>TCP</strong> connections from the non-secure network to the FTP proxy host.<br />

Notice in Figure 22-16 how a connection is established from the FTP server<br />

port 20 in the non-secure network to the FTP proxy server's ephemeral port<br />

number. To allow this to happen, <strong>IP</strong> filtering rules are used that allow inbound<br />

connection requests from port 20 to an ephemeral port number on the FTP proxy<br />

host. This is normally not an <strong>IP</strong> filter rule. It is sometimes better to add a custom<br />

filter rule configuration, because it would allow a cracker to run a program on<br />

port 20 <strong>and</strong> scan all the port numbers above 1023, which, in its simplest form,<br />

might result in a denial-of-service situation. Some firewalls h<strong>and</strong>le this correctly<br />

by building a table of outgoing FTP requests <strong>and</strong> matching up the corresponding<br />

incoming data transfer request.<br />

FTP<br />

client<br />

epn: Ephemeral port number n<br />

Figure 22-16 Normal mode FTP proxy<br />

802 <strong>TCP</strong>/<strong>IP</strong> <strong>Tutorial</strong> <strong>and</strong> <strong>Technical</strong> <strong>Overview</strong><br />

Client host FTP proxy server host<br />

Proxy Server<br />

FTP proxy<br />

ep1 21 ep2<br />

21<br />

Incoming<br />

ep4 20 ep3<br />

20<br />

Secure<br />

network<br />

Non-secure<br />

network<br />

Server host<br />

FTP<br />

server

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!