Multi Hop SSH Tunnel Socks Proxy
Posted on 27th Sep 2016 14:03:29 in Network
On the client PC using putty setup a connection to Server 1 with a tunnel configured - L1081 127.0.0.1:1081
This creates a tunnel to Server 1 that exits on Server 1 on port 1081, now on server 1 we create the socks proxy tunnel to server 2 that listens to port 1081 using the command below.
"ssh -D 1081 -f -C -q -N user@server2 -p 22"
Now on the client you can configure your browser to use a socks proxy on 127.0.0.1:1081 that exits on server 2 via the multi hop tunnel.
Test the proxy by checking what your browser IP is appearing as, this should be the IP of server 2.