Appendix vii: socks information – Fairbanks FB3000 Kernel Program Operators Manual User Manual

Page 61

Advertising
background image

04/12

61

51146 Rev. 3

Appendix VII: SOCKS Information

SOCKS is an Internet Protocol that allows client-server applications to transparently
use the services of a network firewall.

─

SOCKS is an abbreviation for "sockets".

─

Clients behind a firewall, needing to access exterior servers, may connect
to a SOCKS proxy server instead. Such a proxy server controls the
eligibility of the client to access the external server and passes the request
on to the server.

─

SOCKS can also be used in the opposite way, allowing the clients outside
the firewall (exterior clients) to connect to servers inside the firewall
(internal servers).

A typical SOCKS 4 connection request looks like the following (each number is one
byte).

Client to SOCKS Server:

Field 1: SOCKS version number, 1 byte, must be 0x04 for this version

Field 2: Command code, 1 byte:

─

0x01 = Establish a TCP/IP stream connection.

─

0x02 = Establish a TCP/IP port binding.

Field 3: Network byte order port number, 2 bytes.

Field 4: Network byte order IP address, 4 bytes.

Field 5: The user ID string, variable length, terminated with a null (0x00).

Server to SOCKS client:

Field 1: Null byte.

Field 2: Status, 1 byte:

─

0x5a = Request granted.

─

0x5b = Request rejected or failed.

─

0x5c = Request failed because client is not running identd (or not
reachable from the server).

─

0x5d = Request failed because client's identd could not confirm the user ID
string in the request.

Field 3: 2 arbitrary bytes, that should be ignored.

Field 4: 4 arbitrary bytes, that should be ignored.

Advertising