0

I'm trying to expose my local dev server externally so that my web app can be tested by users who are not in my local network. Users who test the web app must run the apps with localhost:3000 and localhost:8080 in their browsers, as those are white listed domains. I thought this would be a perfect application for my Raspberry Pi to act as a proxy using SSH tunneling. This is my setup:

enter image description here

Local port forwarding (i.e. ssh -L) is working well, but I can't get remote port forwarding (i.e. ssh -R) to work. I'm not able to load localhost:3000 or localhost:8080 from either the Client or the Raspberry Pi. I even enabled GatewayPorts yes on my Raspberry Pi as instructed here: https://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html. The fact that those URLs won't load on my Raspberry Pi implies to me that this problem is between the Raspberry Pi and my Dev Server. How can I get this proxy working?

2
  • Does the access to localhost:3000 work on the dev server? Does tcpdump -i lo -n tcp port 3000 show packets on the dev server and on the Raspi when you try to connect to localhost:3000 on the Raspi? Nov 28, 2021 at 3:09
  • As it turns out, the problem was due to using a Windows machine as the server (the one doing ssh -R). When I switched it to a Mac, everything just worked. I'd still like to get Windows working, but at least I know that the technique works. Nov 28, 2021 at 23:08

1 Answer 1

2

It turns out that my problem was because I was using Windows (and Powershell's ssh) on the server for remote port forwarding (ssh -R):

enter image description here

Once I switched the server to a Mac, it worked just fine:

enter image description here

Note: The client can be Windows using Powershell's ssh and it still works fine:

enter image description here

I'd still like to get a Windows server working with remote port forwarding, but the problem seems to be specific to Windows and not the design of the system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .