How to setup a TOR proxy

Yoplux
3 min readSep 29, 2021

--

In this tutorial we will use two hosts, one to deploy the socks5 PROXY and the other one to connect through it.

But first, what is a proxy ?

In the more particular environment of networks, a proxy server is a client-server computer function whose function is to relay requests between a client function and a server function

What about the socks5 ?

Socks5 is an Internet protocol designed to enhance the privacy of an Internet user. To date, this 5th version of Socks the most recent and offers several relevant features to route packets between a server to a client using a proxy. In practice, this process generates TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) connections via random IP addresses.

Why do we use a Socks5 proxy instead of an HTTP proxy?

The compatibility of these protocols becomes a major argument here. Indeed, an HTTP proxy is able to interpret HTTP or HTTPS web pages. On the other hand, a Socks5 proxy can work with any traffic, without any limitation.

Tor installation & configuration

apt update; apt install tor -y

You can now check if tor is running

systemctl status tor.service

Now go to /etc/tor/torrc to change the config file of tor

nano /etc/tor/torrc

This is what you have to uncomment and add into the torrc config file, you can add many more things https://2019.www.torproject.org/docs/tor-manual-dev.html.en

  • SocksPort use the ip address of your linux machine and the port to open for the application connections.
  • MaxCircuitDirtiness 5 Tor creates new circuits on its own every ten minutes.
  • SocksPolicy accept The proxy only accept the connections on my LAN.
  • Log debug This is the path to have debug logs.
  • RunAsDaemon 1 To run as background.

We can restart the service

systemctl restart tor.service

Now you can connect your browser (firefox) to the proxy and try to access to a .onion link.

Search “proxy

Enter the address of your proxy and the port. /!\ USE SOCKS5 /!\

Let’s give a try :)

Also let’s see the ip address

Signed Alix.

--

--