SOCKS is a proxy protocol for client/server environments. SOCKS includes twoprimary components, the SOCKS server and the SOCKS client
~~~~~~~~~~
library. The SOCKS server implementation is at the application layer and the SOCKS clientlibrary is between the client's application and transport layers.
~~~~~~~~~
What is a Proxy
A proxy server makes a connection to the application server for the client. The proxy server relays data between the client and the
~~~~~~~
applications server. From the application server's perspective, the proxy server is the client. When a client wants to make a connection to
~~~~~~
an application server, the clientconnects to the proxy server. The application server's address and port number are passed to the proxy server via a proxy protocol. The proxy server thenconnects to the application server. Once the connection to the application server is established, the proxy server relays data between the client and theapplications server.
Currently, there are two versions of the SOCKS protocol, version 4 and version5. The SOCKS version 4 protocol is often referred to as "SOCKS V4". Similarly, the SOCKS version 5 protocol is referred to as "SOCKS V5". Place in OSI layer
Typical use
Because of its simplicity, SOCKS has been widely used as a circuit-levelfirewall. Because the SOCKS server appears as the client to the application server, the clients are hidden. The SOCKS server provides a single point ofaccess for external traffic. SOCKS Model
The SOCKS V4 protocol performs three functions; connection request, proxycircuit setup, and application data relay. The SOCKS V5 protocol adds authentication. For more information on the SOCKS version 4 and SOCKSversion 5 protocols, see:
SOCKS V4 SOCKS V5 Figure 1 shows the SOCKS V5 control flow model. The portion within the greendashed-line represents SOCKS V4 functionality. Note that SOCKS V5 adds authentication. Control flow of SOCKS
Figure 1 Why SOCKS?
SOCKS was originally intended as a network firewall. And SOCKS is still oneof the most popular alternatives to network firewalls. Besides its
~~~~~~~~~~~~
simplicity and flexibility, SOCKS V5-based firewalls have these advantages:
Transparent network access across multiple firewalls Easy deployment of authentication/encryption methods Rapid deployment of new network applications Simple extension of network security policy Flexible network traffic screening and filtering