GianfrancoPa
Posts: 77
Joined: Sun Jul 22, 2012 8:34 am

Web tunnel on reverse tunneling connection [PuTTY]

Mon Nov 13, 2017 11:48 am

Good morning!

I've this configuration:

NET A: where I'm located with my "PC" where runs PuTTY

NET B: here is located the "Raspy A" with SSH port opened to WAN

NET C: here is located the Web Server "WWW" and the "Raspy B". All ports are closed to WAN

------------------------------------
Between Raspy A and Raspy B is active a reverse tunneling enstabilished with this procedure:

On Raspy B:
$ /usr/bin/ssh -fgNnT -o [...] -R 41722:localhost:22 pi@Raspi_A_IP

On Raspy A:
$ ssh -p 41722 localhost
------------------------------------


I'm able to configure a SSH tunnel using PuTTY, and open the web page using the browser, but not on a reverse tunneling, so my goal is to open WWW pages from my PC!.

Thanks at all!!

mfa298
Posts: 1002
Joined: Tue Apr 22, 2014 11:18 am

Re: Web tunnel on reverse tunneling connection [PuTTY]

Wed Nov 15, 2017 10:01 am

GianfrancoPa wrote:
Mon Nov 13, 2017 11:48 am
Good morning!

I've this configuration:

NET A: where I'm located with my "PC" where runs PuTTY

NET B: here is located the "Raspy A" with SSH port opened to WAN

NET C: here is located the Web Server "WWW" and the "Raspy B". All ports are closed to WAN

------------------------------------
Between Raspy A and Raspy B is active a reverse tunneling enstabilished with this procedure:

On Raspy B:
$ /usr/bin/ssh -fgNnT -o [...] -R 41722:localhost:22 pi@Raspi_A_IP

On Raspy A:
$ ssh -p 41722 localhost
------------------------------------


I'm able to configure a SSH tunnel using PuTTY, and open the web page using the browser, but not on a reverse tunneling, so my goal is to open WWW pages from my PC!.

Thanks at all!!
You might need to look at using a ProxyCommand setup as part of this, although it might be possible with some of what you're already doing. The other thing to look at is the -D flag which makes the ssh tunnel also act like a SOCKS proxy.

For your RaspyA command you could try something like:

Code: Select all

ssh -p 41722 localhost -D8090
You could then setup the SSH session from the PC to RaspyA including a local port forward for 8090 (equivalent of -L 8090:localhost:8090) and point your browser to use localhost 8090 as a socks proxy.

Some browsers have addons that can setup rules of what proxies to use for what sites, On firefox I've used FoxyProxy in the past for that purpose.

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 18 guests