rofl0r / proxychains-ng

proxychains ng (new generation) - a preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies. continuation of the unmaintained proxychains project. the sf.net page is currently not updated, use releases from github release page instead.
http://sourceforge.net/projects/proxychains-ng/files
GNU General Public License v2.0
9.82k stars 1.08k forks source link

Doubt chain proxychains and dante socks proxy #247

Closed F4kda7 closed 6 years ago

F4kda7 commented 6 years ago

How i could chain proxychains and dante socks proxy with the purpose to redirect the traffic to other server?

I have two remote servers in different networks

I would like to know if i could chain these programs with a secure connection like ssh

In proxychains should i add the ip of the public server or only allow proxies ip like socks5 127.0.0.1 9050 ?

What configuration is needed?

Server1 (use proxychains and it will chains the connection of the server2) - > then i go throught the traffic of the server 2

Thank you so much

rofl0r commented 6 years ago

run ssh on server1 and some socks server on server2 (let's say on port 8080)

then open encrypted ssh conn to server1 like this ssh -D 1080 user@server1 that'll open port 1080 on your localhost as a socks5 tunneled over ssh

then put this into your proxychains.conf

[ProxyList]
socks5 127.0.0.1 1080
socks5 ip-of-server2 8080

you could also run inside the ssh session on server1 an ssh -D command to connect to server2, like this ssh -D 2080 user2@server2

and on your client put into your proxychains.conf

[ProxyList]
socks5 127.0.0.1 1080
socks5 127.0.0.1 2080
F4kda7 commented 6 years ago

Thank you crack :)