How to set up a proxy in ProxyChains on Linux

Comments: 0

Content of the article:

Linux operating system offers enhanced privacy and security for online activities. However, users often need to use a proxy for anonymous browsing, circumventing geo-restrictions, and other purposes. While many applications are compatible with Linux, not all support proxy server integration directly. This is where ProxyChains comes in, a vital tool for ensuring encrypted online traffic and anonymous network access via a proxy.

Key aspects of ProxyChains:

  • It's a lightweight utility compatible with all Linux distributions, including Debian and Ubuntu.
  • ProxyChains can be configured via the terminal and integrates smoothly with native OS programs like Tor or BlackArch.
  • Primarily functioning through Tor, it facilitates TCP and DNS routing and supports SOCKS5, SOCKS4, and HTTP/HTTPS protocols.

Proxy configuration in ProxyChains

To ensure ProxyChains runs smoothly on Linux, you may need to install additional software. Here's how:

  1. Install TOR, an internal OS shell that ensures the security of network connections. Open a command prompt or terminal on your PC and enter the following lines of code one by one:
  2. sudo app-get install torsocks tor

    echo "AutomapHostsOnResolve 1" | sudo tee -a /etc/tor/torrc

    echo "DNSPort 53530" | sudo tee -a /etc/tor/torrc

    echo "TransPort 9040" | sudo tee -a /etc/tor/torrc

    sudo systemctl start tor

    sudo systemctl enable tor

  3. Next, proceed to the direct installation of ProxyChains on Linux. Below is indicated which code to use and for which OS version, so that there are no software conflicts when downloading and unpacking the file.
    • For Debian/Ubuntu: sudo app-get install proxychains
    • For CentOS/RHEL: sudo yum install proxychains
  4. To debug the ProxyChains configuration, you will need to open the settings file in the built-in text editor. You can do this with the following command:
  5. sudo nano /etc/proxychains.conf

  6. In the file, you will find lines that define proxy servers. An example of such a line is shown below. The format for entering data for a new connection is immediately clear here. SOCKS4 is the connection protocol, 127.0.0.1 is the local host IP address, 9050 is the port.

    1.png

  7. To configure your proxy servers, you need to add or change these lines in the file in the following format: “protocol IP address port”. All data is indicated separated by a space. To use private proxies, after the port number you need to specify your username and password separated by a colon. After editing the file, the proxy data should look like the example below.

    2.png

  8. Close the configuration settings file. Go back to the terminal and try running the program using "proxy chains" on Linux. To do this, simply prefix the desired command with the proxychains prefix. The example below indicates that you are running a site at "site.com" through the "Firefox" browser using "Proxychains".
  9. proxychains firefox site.com

  10. If you're using a specific proxy pool, it's worth looking into capabilities such as proxy streaming. You can use the following flags in the configuration settings:
    • dynamic_chain - reads proxies in the order in which they were specified;
    • random_chain - uses random order;
    • strict_chain - reads in a row, including broken lines.

Setting up ProxyChains on your Linux system will change your IP address, enhancing your online anonymity.

Comments:

0 comments