If you want to redirect the TCP traffic of one of your applications through socks4, socks5 or HTTP proxies there is a great tool for that. It is used for Linux and UNIX-based systems. Be aware that this tool does not proxy UDP or ICMP (ping).
Use cases
If you redirect your traffic to pass through an SSH socks tunnel this can change the IP of your packets. Therefore, this tool helps bypassing some internet restrictions. Although you should be careful about DNS leaking — if you don't configure this tool to use proxy_dns your DNS queries will bypass proxychains, exposing your real IP and threatening your privacy.
Installation
For Debian/Ubuntu systems use this:
sudo apt-get install proxychains4
Configuration
On Ubuntu, you should edit the config file using this command:
sudo nano /etc/proxychains.conf
There are three ways for chaining different proxies:
- Dynamic
- Strict
- Round-robin
Uncomment the method you want to use in the config file. Also, for those who want to proxy their DNS queries enable proxy_dns. After enabling this, hostname lookups are sent through the proxy chain rather than your system resolver.
Examples
socks5 192.168.67.78 1080 lamer secret
http 192.168.89.3 8080 justu hidden
socks4 192.168.1.49 1080
http 192.168.39.93 8080
It's better to use your own VPS for setting up a proxy server. You can find servers for $2 a month at hostvds. Remember that free proxy servers can see:
- Websites you visit
- DNS requests
- Unencrypted traffic
- Metadata such as connection times and destinations
Running
proxychains4 firefox
Now if firefox opens without any error, you should see the IP of your proxy server as your own IP in websites like this. Ensure to check for DNS leaks in this website.
Please note that even if you use your own VPS as a proxy server, it does not make you anonymous because the VPS may know your real IP in their logs and also can track you based on the payment method that you chose. Probably the only negative aspect of using a proxy or VPN is the sense of false security. You must know the difference between privacy and anonymity. Although using a proxy server can stop your ISP from knowing the websites that you visit.
Stay private :)