How To Setup Proxychains In Linux:
Proxychains in Linux is another tool for anonymity providing anonymity and safe browsing with proxychains is easy. The proxychains works on socks4, socks5, HTTP, and https protocols. Setting up proxychains is easy but many users get errors while using them, some of the most common errors occur during tor installation and other errors like proxychain starts but you are not anonymous and your DNS leaks appear.
How to setup Proxychains In Linux?
To setup proxychains you will first need the tor service, most of the time the service is preinstalled. To check if there is tor service available or not just use this command.
service tor status
If you get any error after using this command then it means tor service is not available in your system, to install tor service use the following command.
sudo apt-get install tor
We had already installed tor service before so there will be a difference in execution. If you get any error while doing this then check the below steps in this article.
After installing tor service, now we need to configure proxychains. To do so use the following command.
You can use any editor of your choice here we are using nano, you can also use vim, leafpad or sublime etc.
In the configuration, you will see “#” which means bash language comments. You can use arrow keys to scroll down and do the following changes.
- Remove Dynamic chain from comment
- comment Strict chain and Random chain
- Remove proxy DNS from comment
- write socks5 127.0.0.1 9050 in last line of proxy list
Save the configuration file and exit the terminal. The proxychains setup is complete. To start proxychains first restart the tor service and then launch proxychains in firefox with a link for a particular search engine like bing, duckduck go. Use the following commands:
service tor restart proxychains firefox www.bing.com
After running the following commands firefox will launch and www.bing.com will load. When you run the command you must not get any error and bing should get loaded. Also please close all firefox tabs before executing the commands.
You can see that after executing the proxychains bing loaded with some other language. Now let’s do a DNS leak test by searching DNS leak test and open any website providing the same.
You can see that my location is now changed from INDIA to GERMANY and the good thing is that proxychains keeps on changing my IP address in a dynamic way so that it provides good anonymity.
If you want that you see a different result then you can just close the firefox and clear the terminal, restart tor service and again launch proxychains you will see some different results in the DNS leak test as shown below:
This is the result which we got after restarting tor service. Now you might be facing many issues which setting up proxychains, let us see how to solve most of the frequent errors.
What are different errors and how to solve them?
One of the most common errors is for the tor service, when you check for tor service it may not be present and when you try to install it then you get errors like:
Failed to start tor.service: Unit tor.service not found. or Reading package lists... Done Building dependency tree Reading state information... Done Package tor is not available but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'tor' has no installation candidate
This error mostly occurs when recenlty install system and you have some broken sources repositories. If you are running kali linux just go to the kali documentation in browser and search sources.repositories.
click here for the page. Copy the regular repository and paste it in sources.list
You can easily find repositories for your Linux version. After copying the source repository use command
apt-get update && apt-get upgrade
This may take some time and data depending on your version of Linux. This can solve one of the biggest error of proxychains.
The second error is for DNS leaks and server not found in the browser. If you get these errors then make sure that you restarted the tor service and your browser is not running. Also, check that dynamic chain in the proxy configuration is not commented, along with that check for proxy DNS also, make sure that both are not commented.