I'm working at home.
I need to access machines which are in the office. The office has a private LAN (e.g. 192.168.0.0/16) with 100 machines on it. I would like to be able to access these machines from home.
We have one SSH bastion (SSH gateway) host available at gateway.example.org, and we can use this for SSH tunnels.
Here's what I want to do:
- SSH from home to gateway.example.org . Somehow, I need to set up the appropriate tunnel (SSH tunnel, SOCKS proxy, etc.)
- If the request is for an IP on the 192.168.0.0/16, then force it through a tunnel or a proxy.
- If the requested IP does not match the 192.168.0.0/16 network, then don't use a proxy. Some people use ssh to tunnel all TCP traffic. But I only want to proxy requests to the 192.168.0.0/16 network.
Can I use SSH forwarding or a proxy to do this?
I can use a SOCKS proxy with SSH Dynamic Port Forwarding with OpenSSH on Linux/Unix (PuTTY supports similar functionality):
ssh -v -D 3333 gateway.example.org.
But this just works for the webbrowser and a few other SOCKS-aware applications.
I would like to force some other traffic (VNC ports 5900/5901) through a proxy as well. In particular, I'm trying to figure out how to get Dell DRAC and the application and a Supermicro IPMI KVM-over-LAN to work over this SSH tunnel.
I am currently using a Mac (Snow Leopard) laptop, although I'm looking for a more general networking concept which will work on multiple operating systems.