[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Have socks proxy working with libssh
[Thread Prev] | [Thread Next]
- Subject: Re: Have socks proxy working with libssh
- From: Alberto Garcia <agarciaillera@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 23 Jan 2019 15:30:32 -0800
- To: libssh@xxxxxxxxxx
Hi, Let me try to explain: My code uses libssh to create a client and a server within the same binary. In machine A I run my tool: - The client part creates a reverse ssh tunnel against a regular OpenSSH server in machine B. - The server part listens in a port (lets say 1234) and the tunnel created with machine B forwards everything to the server part of my tool (at port 1234). Basically I just do a reverse tunnel. That works great and at machine A I can do `ssh -p [binded_port] localhost` and I get a shell in machine B (just like a regular reverse ssh tunnel). The problem is that I would like to use dynamic port forwarding so in machine A I can run `ssh -p [binded_port] -D 0.0.0.0:11223 localhost` and creating a SOCKS5 proxy. That is what is not working. A new socket listens at 0.0.0.0:11223 at machine A but I can't for example browse the internet using that socket. My understanding is that a new channel should be created every time that I try to reach a different IP:PORT using the socks proxy, meaning that if I use the SOCKS5 proxy to browse the internet I will get a new channel per every new web site I visit. Did this further info helped? Thanks in advance. On Wed, Jan 23, 2019 at 1:54 PM <g4-lisz@xxxxxxxxxxxx> wrote: > I don't really understand what you are trying to accomplish. Your libssh > client/server create a tunnel, and through this you run a another SSH > tunnel for SOCKS, using an OpenSSH client? Why you don't connect to the > server directly? > > Turn on debugging on both sides and look for socket faillures or similar... > On 23.01.19 21:01, Alberto Garcia wrote: > > > the problem is that using that tunnel as a SOCKS proxy doing ssh -p > [port] -D 0.0.0.0:11223 localhost does not work. It does create a > listening socket at port 11223 but when I set that port and IP on my > browser to browse the internet it does not work. > > -- Alberto García Illera GPG Public Key <https://goo.gl/yshdwh>
Have socks proxy working with libssh | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Have socks proxy working with libssh | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Have socks proxy working with libssh | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Have socks proxy working with libssh | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Have socks proxy working with libssh | g4-lisz@xxxxxxxxxxxx |