portforwarding - How SSH forward HTTP request to backend server? -
we have 3 machine, say, a, may laptop, b, jump machine, , c web server. jump server can access public network without limitations, web server c limited, , only port 22 (ssh service) opened b, , can talk dual-direction via ssh.
we want deploy web server on c, bind port 7788, can configure b forward following request c on port 7788, , without configure c?
curl b.ip:7788
it doesn't require special configuration on b, except port forwarding must allowed (allowtcpforwarding).
on a,
$ ssh -l17788:c.ip:7788 b.ip then on a, browse to
http://localhost:17788/ there's nothing special 17788, can use free localhost port on a. add 10000 tunnelled destination port keep simple , easy remember.
Comments
Post a Comment