I have a problem with network setup, and my poor networking knowledge or my local linux community can't help me.
I have server A (right near my PC), which is hidden behind a NAT-router, and server B, which is VPS with static IP.
I want to use my server A as network server, accessible from everywhere in the Internet (and, thereafter, as own small web-hosting). I have realized how I can access server A through server B through SSH from internet - reverse SSH tunelling. But this thing has two defects:
- it passes only ONE port (I want all of them, for example, to simultaneously maintain web-, ssh- and some more servers)
- I can't access server A right from web - I must connect to server B, then do
ssh -p 22222 username@localhost
Is there any solution to pass all ports to existing tunnel? All things that I found in Internet are about OR making reverse tunnel OR passing ports to direct tunnel, but not about passing to existing reverse tunnel.
serverBPublicIP
<- you don't need to specify the public IP of your server, you can specify an ip for any interface on the remote machine – nurettin Jul 12 '19 at 08:33