ProxyChains is redirecting packets destined to local machine to the proxy server

6,699

The following patch has been included in this fork.

Build with

git clone https://github.com/rofl0r/proxychains
cd proxychains
git checkout v4.5
./configure
make
sudo make install
sudo rm /usr/local/etc/proxychains.conf

Create the following config file in /etc/proxychains.conf:

strict_chain
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
[ProxyList]
socks4 127.0.0.1 8080

(See src/proxychains.conf for a commented example).

Start the SOCKS proxy on local port 8080 to send traffic via a proxy-free server:

ssh -D 8080 -f -C -q -N <proxy-free server>
Share:
6,699
Ashish
Author by

Ashish

Building solutions for Legal community at Provakil

Updated on September 18, 2022

Comments

  • Ashish
    Ashish over 1 year

    I am using ProxyChains to connect to my proxy at college. It works very fine except that it even redirects packets meant for a local port to the proxy server :

    |S-chain|-<>-172.22.2.211:3128-<><>-4.2.2.2:53-<><>-OK

    |S-chain|-<>-172.22.2.211:3128-<><>-127.0.0.1:57343-<--denied

    Is there any way to add an exception for 127.0.0.1 in ProxyChains

  • slm
    slm about 11 years
    Welcome to Server Fault! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the FAQ for more info.