Can I use SSH tunnels as a VPN substitute?

Solution 1:

I use a combination of dynamic port forwarding and a smart proxy.

ssh -D 12345 me@work

This will set up a SOCKS proxy that listens on your local machine on port 12345, and it proxies traffic over to your work network.

Then install "FoxyProxy" on Firefox. FoxyProxy has rules to allow it to decide whether to send an HTTP request directly to the destination, or to send it through a proxy.

You want to run vnc through the tunnel. Some viewers like xvncviewer have a "-via" option, which will open their own SSH tunnel just for that session. Or you could run the vnc viewer through a program like "tsocks", which will use the 12345 tunnel that we set up above.

Solution 2:

I'm looking for a more general networking concept which will work on multiple operating systems.

The more generic option would be just to setup a VPN. There are many different VPN technologies. I strongly prefer OpenVPN.

There are ways to build a VPN over SSH, but that doesn't perform that well, and most methods tend to take a lot of obscure configuration, the methods will not be cross platform.