Quantcast
Channel: Connect to my company's intranet LAN-only web site from outside with ssh tunnel - Super User
Viewing all articles
Browse latest Browse all 4

Answer by Miserable Variable for Connect to my company's intranet LAN-only web site from outside with ssh tunnel

$
0
0

I haven't quite understood your configuration but when you ssh to the company server you should be able to set up a ssh tunnel so that you can use browser to access company webserver.

You do not need to set up /etc/hosts on your local machine. Using the ssh parameter

-L port:host:hostport

All traffic to port on localhost is tunnelled to host/hostport on the remote. So, when you do

 ssh -L 80:web-server:80 user@ssh-server -p 22

http://localhost will be redirected to the web-server:80. Note that the hostport is translated on the remote server, i.e. the ssh server.

-p 22 is not needed if the ssh server uses the default port, but the question does say that the SSH server goes through a custom port. In that case, change 22 for the custom port.

If the system complains that Privileged ports can only be forwarded by root, run it as superuser:

sudo ssh -L 80:web-server:80 user@ssh-server -p 12345

or log as root.


Viewing all articles
Browse latest Browse all 4

Trending Articles