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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Where:<br />

VER Socks protocol version. For SOCKSv5, the value is<br />

hexadecimal X'05'.<br />

CMD SOCKS comm<strong>and</strong> in octets:<br />

X'01' Connect<br />

X'02' BIND<br />

X'03' UDP associate<br />

RSV Reserved for future use.<br />

ATYP Address types in octets:<br />

X'01' <strong>IP</strong>v4 address<br />

X'03' Domain-name<br />

X'04' <strong>IP</strong>v6 address<br />

DST.ADDR Desired destination address.<br />

DST.PORT Desired destination port in network octet order.<br />

An <strong>IP</strong>v4 address is stored as 4 bytes. An <strong>IP</strong>v6 address is stored as 16 bytes.<br />

A domain name is stored as a length byte, <strong>and</strong> then a fully qualified domain<br />

name. There is no trailing null at the end of the domain name.<br />

The server evaluates the request detail message <strong>and</strong> replies with one or more<br />

messages. Here is the reply message format issued by the server<br />

(Figure 22-47).<br />

Figure 22-47 SOCKSv5: Server reply message format<br />

Where:<br />

1 byte 1 byte X'00' 1 byte variable 2 bytes<br />

ver rep RSV ATYP BND.ADDR BND.Port<br />

VER Socks protocol version. For SOCKSv5, the value is<br />

hexadecimal X'05'.<br />

REP Reply field:<br />

X'00' Succeeded<br />

X'01' General SOCKS server failure<br />

X'02' Connection not allowed by ruleset<br />

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

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

Saved successfully!

Ooh no, something went wrong!