mercredi 30 septembre 2020

Accessing a Website on a remote PC over ssh tunnels from multiple devices

I have a Website backend and frontend both running on two ports of one PC. I can access these ports/the website from other devices in the same network without problem.

What I wanted to do now is to make this Website accessible for devices from another network. Point is the PC the project is running on is behind a Proxy so there is no public IP I could use for this (if I understood that correctly). That is why I was doing tests with having two ssh-tunnels to the ports for the frontend and backend from a remote PC over the proxy to the PC where the project is running. With these two ssh tunnels the project works.

My problem now is, that because that through the ssh tunneling, these ports can only be tunneled to one remote machine. If I try to open the same tunnels from yet another remote machine at the same time, I will get the message, that the ports are already in use.

Is there a possibility to make this work for multiple remote machines? I thought maybe it would be possible to kind of "redirect ports". So that it maybe is possible to reserve a range (there are only a limited amount of users for this system and it is only privately used btw) of ports and when a remote client opens an ssh tunnel to one of those, it will always be mapped to the ports where the website is running. For instance it doesn't matter if I connect to port 5000 or 5001 (given that the website is running on port 5000) and it will still work?

Sorry for the bad description, I don't really have any background knowledge on how this could be working? Maybe there is also a better solution than the ssh tunnels in general? Thanks in advance for any help!




Aucun commentaire:

Enregistrer un commentaire