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.

Client host SOCKS host<br />

Client<br />

IdentD<br />

ep1 1080<br />

113<br />

Secure<br />

network<br />

ep2<br />

epn: Ephemeral port number n<br />

sss: Server port number sss<br />

Figure 22-43 Socks <strong>TCP</strong> segment flow<br />

Proxy Server<br />

SOCKS<br />

Non-secure<br />

network<br />

Server host<br />

Real<br />

server<br />

The SOCKSv5 server listens for connections on a given port, usually 1080.<br />

According to the connection type (<strong>TCP</strong> or UDP), the steps discussed in the<br />

following sections establish a connection.<br />

SOCKSv5 <strong>TCP</strong> connection<br />

To establish a connection using <strong>TCP</strong>, the client first sends a <strong>TCP</strong> packet that<br />

contains session request information through port 1080 to the server (see<br />

Figure 22-43). If the access permissions allow this operation <strong>and</strong> the connection<br />

request succeeds, the client enters an authentication negotiation. In this state,<br />

the authentication type is determined, after which the client sends a relay<br />

request. The SOCKSv5 server evaluates the request <strong>and</strong> either establishes the<br />

connection or rejects it. The client sends the following message, which contains<br />

a version identifier <strong>and</strong> method options (Figure 22-44).<br />

Figure 22-44 SOCKSv5: Version identifier <strong>and</strong> method selection message format<br />

ep3<br />

1 byte 1 byte 1 to 255 bytes<br />

ver nmethods methods<br />

sss<br />

Chapter 22. <strong>TCP</strong>/<strong>IP</strong> security 849

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

Saved successfully!

Ooh no, something went wrong!