-2

I'd like to setup an ssh tunnel from a remote location to a private web server on our LAN. The web server on the LAN is using Virtual Hosts and there is some redirection going on. Sometimes a user will connect to private.web.server and be told by the server to redirect to private2.web.server. An example of this would be when the user clicks the "login" link over the SSH tunnel. The link redirects to private2.web.server where our login application runs. Since there is no tunnel to this host and there is no DNS name from the user's standpoint, the link fails.

Ignoring the obvious fix by using a VPN, is there some way in SSH to magically make this work?

Thanks!

1
  • As suggested by Stephen, a SOCKS proxy is probably the best way to go. You could also setup additional tunnels to reach other servers inside your network.
    – ceskib
    Jun 10, 2015 at 15:18

1 Answer 1

2

Rather than using a tunnel directly, try using SSH as a SOCKS proxy:

Start proxy ssh -D 2222 [email protected]

Set your client OS/Browser to use 127.0.0.1:2222 as a SOCKS proxy.

You may still need to setup hosts file entries on the client machine to have the internal hostnames resolve to IP addresses

You must log in to answer this question.

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