SOCKS

SOCKS stands for Socket Secure. It exchanges data packets between client and server via proxy. It operates on the Session Layer of the OSI model.

It allows users to surf on the Internet anonymously. More than that It gives you accessibility of applications only one secure port connection.

In this post, I will implement fundamental usage of SOCKS. On the client side we just need open-ssh client and tsocks. open-ssh client exists all Linux distributions. So We only need tsocks. tsocks is a library to implement SOCKS.

Install tsocks(client)

Configure tsocks(client)

Open /etc/tsocks.conf and add lines below at the end of the line.

Initiate Connection(client)

Initiate connection between client and SOCKS proxy. -D option is the most important argument for this purpose.

It tells that whenever connection is made port 1080, connection is forwarded to the host istanbul over ssh.

For more information. $ man ssh

SOCKS server side

Only thing we need is on SOCKS server side is permission for the ssh connection and ssh server up and running.

Diagram:

It is depicted below diagram to leverage to SOCKS service.

 

 

 

 

 

 

Experiment:

Most excited part of this post. First scenario I will request connection to the https://whatismyip.com via firefox without leveraging tsocks. And Second Scenario I will request the same url with tsocks.

Scenario 1:

Without tsocks.

 

 

 

 

 

 

Scenario 2:

With tsocks.

 

 

 

 

 

 

Happy anonymity. 🙂